Disable logrotation ruby Logger

2019-08-23 06:35发布

问题:

I am using ruby Logger to log messages

logger = Logger.new('log/sql.log', 1, 500 * 1024 * 1024)

the age of file is 1 day and size of log file is 500MB. when it reaches 500MB, it will rotate log file and will keep 1 day age files.

i have already configured Linux log rotation using crontab for all log files. Now i want to completely disabled log rotation which is causing by ruby Logger.

is there any way to do that ?

Thanks