|
|
|
@ -145,12 +145,14 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
|
|
|
|
|
var oerr error
|
|
|
|
|
oerr = os.MkdirAll(filepath.Dir(gIcsLog.LogFileName), 0777)
|
|
|
|
|
if oerr != nil {
|
|
|
|
|
fmt.Println("mkdir err : ", oerr)
|
|
|
|
|
icserror.ICSERRMakeDir.SetError(oerr)
|
|
|
|
|
icserror.ICSERRMakeDir.PrintWithCaller(0)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
fmt.Println("mkdir success")
|
|
|
|
|
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0777)
|
|
|
|
|
if oerr != nil {
|
|
|
|
|
//fmt.Println(gIcsLog.LogFileName)
|
|
|
|
|
icserror.ICSERRFileOpen.SetError(oerr)
|
|
|
|
@ -168,7 +170,7 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0777)
|
|
|
|
|
if oerr != nil {
|
|
|
|
|
//fmt.Println(gIcsLog.LogFileName)
|
|
|
|
|
icserror.ICSERRFileOpen.SetError(oerr)
|
|
|
|
@ -186,7 +188,7 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
|
|
|
|
gIcsLog.LogFile, oerr = os.OpenFile(gIcsLog.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0777)
|
|
|
|
|
if oerr != nil {
|
|
|
|
|
//fmt.Println(gIcsLog.LogFileName)
|
|
|
|
|
icserror.ICSERRFileOpen.SetError(oerr)
|
|
|
|
|