mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-12 22:54:43 +08:00
日志文件以追加方式打开
This commit is contained in:
@@ -67,7 +67,7 @@ func (slf *CServiceManager) Start(exit chan bool, pwaitGroup *sync.WaitGroup) bo
|
||||
}
|
||||
|
||||
pwaitGroup.Add(1)
|
||||
go slf.CheckServiceTimeTimeout(exit, pwaitGroup)
|
||||
//go slf.CheckServiceTimeTimeout(exit, pwaitGroup)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ func (slf *LogModule) CheckAndGenFile() {
|
||||
}
|
||||
|
||||
var err error
|
||||
slf.logFile, err = os.Create(slf.GetCurrentFileName())
|
||||
slf.logFile, err = os.OpenFile(slf.GetCurrentFileName(), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0766)
|
||||
if err != nil {
|
||||
fmt.Printf("create log file %+v error!", slf.GetCurrentFileName())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user