Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed

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

wants to merge 1 commit into from

Conversation

tjwallace
Copy link

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

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
@rudionrails
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants