{"id":761,"date":"2019-11-30T17:59:29","date_gmt":"2019-11-30T17:59:29","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=761"},"modified":"2019-11-30T18:05:36","modified_gmt":"2019-11-30T18:05:36","slug":"go-logger-rotation","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/go-logger-rotation\/","title":{"rendered":"Go Logger Rotation"},"content":{"rendered":"\n

This article is about how we rotate log files from within the go app without having to worry about the disk full alerts.<\/p>\n\n\n\n

We are going to use https:\/\/github.com\/lestrrat\/go-file-rotatelogs<\/a> for log rotation. <\/p>\n\n\n\n

Example:<\/strong> In the example below we are setting <\/p>\n\n\n\n