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