修改日志文件夹名称为logs
修改访问日志级别为debug
This commit is contained in:
parent
ecd780a6f4
commit
d66d99dfaf
@ -172,7 +172,7 @@ type Logrus struct {
|
|||||||
func NewLogger() Logrus {
|
func NewLogger() Logrus {
|
||||||
logFilePath := ""
|
logFilePath := ""
|
||||||
if dir, err := os.Getwd(); err == nil {
|
if dir, err := os.Getwd(); err == nil {
|
||||||
logFilePath = dir + "/log/"
|
logFilePath = dir + "/logs/"
|
||||||
}
|
}
|
||||||
if err := os.MkdirAll(logFilePath, 0755); err != nil {
|
if err := os.MkdirAll(logFilePath, 0755); err != nil {
|
||||||
fmt.Println(err.Error())
|
fmt.Println(err.Error())
|
||||||
@ -235,7 +235,7 @@ func logrusMiddlewareHandler(c echo.Context, next echo.HandlerFunc) error {
|
|||||||
"latency_human": stop.Sub(start).String(),
|
"latency_human": stop.Sub(start).String(),
|
||||||
"bytes_in": bytesIn,
|
"bytes_in": bytesIn,
|
||||||
"bytes_out": strconv.FormatInt(res.Size, 10),
|
"bytes_out": strconv.FormatInt(res.Size, 10),
|
||||||
}).Info("Handled request")
|
}).Debug("Handled request")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user