기동 시 로그 시간 변경

main
JungJun 3 years ago
parent a58eda893f
commit 763bbab3e5

@ -130,7 +130,8 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
//make log file - icsvg.log-yyyymmdd
yyyy, mm, dd := gIcsLog.CurrentDate.Date()
gIcsLog.LogFileName = fmt.Sprintf("%s/icsvs.log-%d%02d%02d", gIcsLog.Path, yyyy, mm, dd)
hh, mi := time.Now().Hour(), time.Now().Minute()
gIcsLog.LogFileName = fmt.Sprintf("%s/icsvs.log-%d%02d%02d.%02d.%02d", gIcsLog.Path, yyyy, mm, dd, hh, mi)
stat, err := os.Stat(gIcsLog.LogFileName)
if err == nil {

Loading…
Cancel
Save