From 68ba2f89cb04404ee96883b6775f9abd94f6befc Mon Sep 17 00:00:00 2001 From: JungJun Date: Mon, 25 Jul 2022 20:48:30 +0900 Subject: [PATCH] =?UTF-8?q?=ED=86=B5=ED=95=A9=ED=86=B5=EA=B3=84=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- icslog/icslog.go | 23 +++++++++++------------ voicestatistics.go | 6 +++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/icslog/icslog.go b/icslog/icslog.go index 5c367d4..62c0aa2 100644 --- a/icslog/icslog.go +++ b/icslog/icslog.go @@ -7,7 +7,6 @@ import ( "log" "os" "path/filepath" - "runtime/debug" "strconv" "strings" "sync" @@ -251,9 +250,9 @@ func (s *IcsLog) DelLog() { switch v := err.(type) { case error: icserror.ICSERRFileOpen.SetError(v) - s.Printf(LOG_LEVEL_WARN, -1, "PANIC! %s\n%s", icserror.ICSERRFileOpen.GetError().Error(), string(debug.Stack())) + // s.Printf(LOG_LEVEL_WARN, -1, "PANIC! %s\n%s", icserror.ICSERRFileOpen.GetError().Error(), string(debug.Stack())) default: - s.Print(LOG_LEVEL_WARN, -1, icserror.ICSERRFileOpen.GetError().Error()) + // s.Print(LOG_LEVEL_WARN, -1, icserror.ICSERRFileOpen.GetError().Error()) } } //derr = icserror.ICSERRFileOpen @@ -266,8 +265,8 @@ func (s *IcsLog) DelLog() { files, rderr := ioutil.ReadDir(s.Path) if rderr != nil { - s.Printf(LOG_LEVEL_ERROR, -1, " Read Log Dir error - %s \n", rderr) - fmt.Printf("Read Log Dir error - %s", rderr) + // s.Printf(LOG_LEVEL_ERROR, -1, " Read Log Dir error - %s \n", rderr) + // fmt.Printf("Read Log Dir error - %s", rderr) } else { var logYYYY, logMM, logDD string for _, file := range files { @@ -281,8 +280,8 @@ func (s *IcsLog) DelLog() { logYYYY, logMM, logDD = logTime[:4], logTime[4:6], logTime[6:8] chgLogTime, perr := time.Parse("2006-01-02", fmt.Sprintf("%s-%s-%s", logYYYY, logMM, logDD)) if perr != nil { - s.Printf(LOG_LEVEL_ERROR, -1, " Log Time Parse error - %s \n", perr) - fmt.Printf("Log Time Parse error - %s", perr) + // s.Printf(LOG_LEVEL_ERROR, -1, " Log Time Parse error - %s \n", perr) + // fmt.Printf("Log Time Parse error - %s", perr) } else { diff := delTime.Sub(chgLogTime) @@ -290,16 +289,16 @@ func (s *IcsLog) DelLog() { if diff > 0 { delResult := icsutil.DeleteFile(s.Path, file.Name()) if delResult != "" { - s.Printf(LOG_LEVEL_ERROR, -1, " Delete File error - %s \n", delResult) + // s.Printf(LOG_LEVEL_ERROR, -1, " Delete File error - %s \n", delResult) } else { - s.Printf(LOG_LEVEL_INFO, -1, " Delete %s!!!!\n", file.Name()) - fmt.Printf("Delete %s!!!!\n", file.Name()) + // s.Printf(LOG_LEVEL_INFO, -1, " Delete %s!!!!\n", file.Name()) + // fmt.Printf("Delete %s!!!!\n", file.Name()) delLogCount += 1 } } } } } - s.Printf(LOG_LEVEL_INFO, -1, " Delete File Count - %d \n", delLogCount) - fmt.Printf("Log Delete Count : %d", delLogCount) + // s.Printf(LOG_LEVEL_INFO, -1, " Delete File Count - %d \n", delLogCount) + // fmt.Printf("Log Delete Count : %d", delLogCount) } diff --git a/voicestatistics.go b/voicestatistics.go index 6baee2f..952f8aa 100644 --- a/voicestatistics.go +++ b/voicestatistics.go @@ -102,9 +102,9 @@ func main() { //fmt.Printf("Service Started - %d\n================================\n", pid) info = "\n" + info - icsLog.Print(icslog.LOG_LEVEL_INFO, -1, info) - icsLog.Print(icslog.LOG_LEVEL_INFO, -1, "Service Started") - icsLog.Print(icslog.LOG_LEVEL_INFO, -1, "================================") + // icsLog.Print(icslog.LOG_LEVEL_INFO, -1, info) + // icsLog.Print(icslog.LOG_LEVEL_INFO, -1, "Service Started") + // icsLog.Print(icslog.LOG_LEVEL_INFO, -1, "================================") ///////////////////////////////// //icsutil.CloseSTDIO()