panic output detail info

This commit is contained in:
Gordon
2021-11-26 14:20:50 +08:00
parent b1244c0a1b
commit 72b09864ce
8 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ func loggerInit(moduleName string) *Logger {
//Close std console output
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
if err != nil {
panic(err)
panic(err.Error())
}
writer := bufio.NewWriter(src)
logger.SetOutput(writer)
@@ -82,7 +82,7 @@ func initRotateLogs(rotationTime time.Duration, maxRemainNum uint, level string,
rotatelogs.WithRotationCount(maxRemainNum),
)
if err != nil {
panic(err)
panic(err.Error())
} else {
return writer
}