开发者

Production Log level :warn but I want more data

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜