rotate 수정

main
JungJun 2 years ago
parent 9f91fec4b8
commit d1505162d4

@ -139,7 +139,7 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
// make log file - LGT.001.20220715.log // make log file - LGT.001.20220715.log
// log dir - /logs/voiceGW/tlo/{YYYYMMDD} // log dir - /logs/voiceGW/tlo/{YYYYMMDD}
yyyy, mm, dd := gIcsLog.CurrentDate.Date() yyyy, mm, dd := gIcsLog.CurrentDate.Date()
hh, mi := time.Now().Hour(), time.Now().Minute() hh, mi := diffMinutes.Hour(), diffMinutes.Minute()
gIcsLog.LogFileName = fmt.Sprintf("%s/%d%02d%02d/LGT.%03d.%d%02d%02d%02d%02d.log", gIcsLog.Path, yyyy, mm, dd, icsconf.GetIcsConfig().InfoConfig.ServerID, yyyy, mm, dd, hh, mi) gIcsLog.LogFileName = fmt.Sprintf("%s/%d%02d%02d/LGT.%03d.%d%02d%02d%02d%02d.log", gIcsLog.Path, yyyy, mm, dd, icsconf.GetIcsConfig().InfoConfig.ServerID, yyyy, mm, dd, hh, mi)
stat, err := os.Stat(gIcsLog.LogFileName) stat, err := os.Stat(gIcsLog.LogFileName)

Loading…
Cancel
Save