We recently switched to log level 'info', because the default log level ('debug') was filling up our disks too fast. When we did this, we noticed that log files seem to get deleted soon after passing 1MB in file size. That's not what we wanted!
In logging.yml, if I change the two occurrences of "log_level: info" back into "log_level: debug" then the behavior stops, but the logs contain too much information too quickly, and outruns our logrotation script.
Is there some way I can get both terse logs and logs that can grow beyond 1MB? I can't find logging.yml documentation beyond a few posts to this list.
config/logging.yml:
development:
logger: rails
log_context: false
log_level: debug
test:
log_level: debug
logger: rails
production:
logger: rails
log_level: info
staging:
logger: rails
log_level: info
A log of the log deletion in progress - I listed prodcution.log's file size every 10 seconds, here you can see it's size grow slowly, then collapse, then begin growing again:
-rw-r--r-- 1 ubuntu ubuntu 985905 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 1016576 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 1040053 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 2699 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 9779 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 21394 Jul 21 16:19 production.log
-rw-r--r-- 1 ubuntu ubuntu 31503 Jul 21 16:20 production.log