Disable ruby ​​logger

I use ruby ​​Logger to log messages

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

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

I already set up Linux log rotation using crontab for all log files. Now I want to completely disable the log rotation that Ruby Logger calls.

is there any way to do this?

thanks

0
source share

Source: https://habr.com/ru/post/1274594/


All Articles