Note: I am talking about Ruby, not Rails.
Is there any way to have Log4r levels set based on the class or file it's logging from?
This is my current configuration for Log4r:
---
log4r_config:
loggers:
- name: logger
level: INFO
outputters:
- default
outputters:
- name: default
type: StdoutOutputter
default: true
formatter:
type: PatternFormatter
date_pattern: '%H:%M:%S'
pattern: '[%l] %d: %m'
Now assume that I want to debug a single class. Is there any way I can take the same instance of the logger (because I want to use the same pattern format) and set it to a different level (DEBUG), without it affecting the level outside the file?
I suppose I couldn't do this from the code, but is there a configuration mechanism which sets the level per file/class?
As reference, in JBoss application server, the logging level can be configured per Java package.