callback kickoff

This commit is contained in:
wangchuxiao
2022-08-11 19:47:59 +08:00
parent aa7ba6d659
commit c2bd1d0d83
7 changed files with 422 additions and 886 deletions
+8 -8
View File
@@ -2,7 +2,7 @@ package log
import (
"Open_IM/pkg/common/config"
"bufio"
//"bufio"
"fmt"
"os"
"time"
@@ -33,13 +33,13 @@ func loggerInit(moduleName string) *Logger {
//All logs will be printed
logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel))
//Close std console output
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
if err != nil {
panic(err.Error())
}
writer := bufio.NewWriter(src)
logger.SetOutput(writer)
//logger.SetOutput(os.Stdout)
//src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
//if err != nil {
// panic(err.Error())
//}
//writer := bufio.NewWriter(src)
//logger.SetOutput(writer)
logger.SetOutput(os.Stdout)
//Log Console Print Style Setting
logger.SetFormatter(&nested.Formatter{
TimestampFormat: "2006-01-02 15:04:05.000",