Hi, here is my code for lumberjack,
log.SetOutput(&lumberjack.Logger{ Filename: conf.CommonConf.LumberjackLogConf.Filename, MaxSize: conf.CommonConf.LumberjackLogConf.MaxSize, // megabytes MaxBackups: conf.CommonConf.LumberjackLogConf.MaxBackups, MaxAge: conf.CommonConf.LumberjackLogConf.MaxAge, //days })
And this is the conf file.
"LumberjackLogConf": { "Filename": "./log/main.log", "MaxSize": 500, "MaxBackups": 5, "MaxAge": 7 }
My problem is there is indeed logs generated in "./log/" as below,
but there also some unknown logs generated in "/tmp/" now and have used up the machine's memory. I have no idea why they are generated. Thanks in advance for your help.
Hi, here is my code for lumberjack,
log.SetOutput(&lumberjack.Logger{ Filename: conf.CommonConf.LumberjackLogConf.Filename, MaxSize: conf.CommonConf.LumberjackLogConf.MaxSize, // megabytes MaxBackups: conf.CommonConf.LumberjackLogConf.MaxBackups, MaxAge: conf.CommonConf.LumberjackLogConf.MaxAge, //days })
And this is the conf file."LumberjackLogConf": { "Filename": "./log/main.log", "MaxSize": 500, "MaxBackups": 5, "MaxAge": 7 }
My problem is there is indeed logs generated in "./log/" as below,but there also some unknown logs generated in "/tmp/" now and have used up the machine's memory. I have no idea why they are generated. Thanks in advance for your help.