mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[REV] append write api log file
This commit is contained in:
parent
f3433cefda
commit
4863092d73
@ -67,7 +67,7 @@ func NewManager(c option.Config) *Manager {
|
||||
r.Use(middleware.RealIP)
|
||||
//Logs the start and end of each request with the elapsed processing time
|
||||
if c.LoggerFile != "" {
|
||||
logerFile, err := os.OpenFile(c.LoggerFile, os.O_CREATE|os.O_RDWR, 0644)
|
||||
logerFile, err := os.OpenFile(c.LoggerFile, os.O_CREATE|os.O_RDWR|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
logrus.Errorf("open logger file %s error %s", c.LoggerFile, err.Error())
|
||||
r.Use(middleware.DefaultLogger)
|
||||
|
Loading…
Reference in New Issue
Block a user