통합통계 로그 경로 수정

main
JungJun 2 years ago
parent 17469b4e13
commit 6e4c9be461

@ -132,7 +132,7 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
// log dir - /logs/voiceGW/tlo/{YYYYMMDD}
yyyy, mm, dd := gIcsLog.CurrentDate.Date()
hh, mi := time.Now().Hour(), time.Now().Minute()
gIcsLog.LogFileName = fmt.Sprintf("%s/LGT.%03d.%d%02d%02d%02d%02d.log", gIcsLog.Path, 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)
if err == nil {

@ -202,7 +202,7 @@ func (s IcsService) LogWatcher() *icserror.IcsError {
// /logs/voiceGW/tlo/{YYYYMMDD}/LGT.001.202207140313.log
// s.log.Path: /logs/voiceGW/tlo 로 변경
// 일자별 rotate를 날짜 폴더로 이동
s.log.LogFileName = fmt.Sprintf("%s/LGT.%03d.%d%02d%02d%02d%02d.log", s.log.Path, s.config.InfoConfig.ServerID, y2, m2, d2, h2, mi2)
s.log.LogFileName = fmt.Sprintf("%s/%d%02d%02d/LGT.%03d.%d%02d%02d%02d%02d.log", s.log.Path, y2, m2, d2, s.config.InfoConfig.ServerID, y2, m2, d2, h2, mi2)
var oerr error
s.log.LogFile, oerr = os.OpenFile(s.log.LogFileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if oerr != nil {

Loading…
Cancel
Save