So I have my log level set to WARN in production (to cut the size of my log file), but when an error开发者_开发百科 occurs, all I get is the stack trace ... no url, ip address, request parameters or anything like that.
Is there anyway to get this information even though my log level is set to WARN?
You may try to add a rescue handler to your controller or controllers and log interesting things there:
def rescue_action_in_public(exception)
logger.error "Parameters: #{params.inspect}"
super
end
But I suggest that setting the logger level to INFO would be a better thing.
精彩评论