For some reason, messages are not being written to the log when I use
the logger.error or logger.info methods. They appear in the
Rails.logger @buffer?
Its worth noting that the system logs just fine, it is just my logger
messages that get stuck in the buffer. If I run Rails.logger.flush
from the console, the messages are written correctly to the production
log. Weird.
Its worth noting that the system logs just fine, it is just my logger
messages that get stuck in the buffer. If I run Rails.logger.flush
from the console, the messages are written correctly to the production
log. Weird.
The buffered log only hits disk when its flushed (which occurs either
when more than X has been logged or as part of the request cycle),
which isn't going to happen by itself when you're running from the
console. Not sure what else you can do other than ensure that flush is
called at some point.