Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ensure width of LEVEL in format can accommodate all levels #6

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

Before:

2012-09-20T09:21:07-07:00 [ WARN] 8542 : warn
2012-09-20T09:21:07-07:00 [ERROR] 8542 : error
2012-09-20T09:21:07-07:00 [UNKNOWN] 8542 : unknown

After:

2012-09-20T09:40:58-07:00 [   WARN] 10321 : warn
2012-09-20T09:40:58-07:00 [  ERROR] 10321 : error
2012-09-20T09:40:58-07:00 [UNKNOWN] 10321 : unknown
Jeff Wallace Ensure width of LEVEL in format can accommodate all levels
Before:
2012-09-20T09:21:07-07:00 [ WARN] 8542 : warn
2012-09-20T09:21:07-07:00 [ERROR] 8542 : error
2012-09-20T09:21:07-07:00 [UNKNOWN] 8542 : unknown

After:
2012-09-20T09:40:58-07:00 [   WARN] 10321 : warn
2012-09-20T09:40:58-07:00 [  ERROR] 10321 : error
2012-09-20T09:40:58-07:00 [UNKNOWN] 10321 : unknown
3f4e6f5
Owner

rudionrails commented Sep 21, 2012

Hi there,

thanks for the work. However, I am not going to merge that into the core since the default fornats only serve as templates. I've deliberately left out the unknown log level, since I've never seen anyone using it (though it is supported for backwards compatibility.

If you want to get the result you are seeking, you can do the following:

logger = Yell.new 'development.log', :format => "%d [%7L] %p : %m"

Am am currently working on better (global) configuration, although you can already set-up yell from a YAML file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment