natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.76k stars 585 forks source link

Unknown logs generated in "/tmp" #147

Open JennyWJN opened 2 years ago

JennyWJN commented 2 years ago

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,

WeChatWorkScreenshot_f73a6de1-04c8-4f02-b8e4-5e2d0a52586f

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.

WeChatWorkScreenshot_0ccb73e2-07be-46fc-8f45-c951fe60ab42