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

Add add_log_level() and add_logger_name() stdlib processors #44

Merged
merged 9 commits into from
Jan 22, 2015
Merged

Add add_log_level() and add_logger_name() stdlib processors #44

merged 9 commits into from
Jan 22, 2015

Conversation

wbolster
Copy link

See #43.

@wbolster
Copy link
Author

@hynek please review

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 260dc7b on wbolster:issue-43 into 203cc04 on hynek:master.

@hynek
Copy link
Owner

hynek commented Jan 22, 2015

Thanks!

Couple very minor issues:

  • add the new functions to api.rst (we forgot it in all other PRs :))
  • …and to the changelog
  • split the test of add_log_level into two please; one normal case and one alias. I try to test only one case per test.
  • please test the return values of the functions, not the side-effect on the passed in event_dict (you don’t have to keep it around either)

Thanks again!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 260dc7b on wbolster:issue-43 into 203cc04 on hynek:master.

@wbolster
Copy link
Author

@hynek take 2

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e64df42 on wbolster:issue-43 into 203cc04 on hynek:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e64df42 on wbolster:issue-43 into 203cc04 on hynek:master.

The log level is added to the event dict.
"""
event_dict = add_log_level(None, 'error', {})
assert 'level' in event_dict
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops sorry i overlooked it in the first round: this is implicitly tested in the next line, let’s keep it simple

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed it. Though it will fail with a KeyError instead of an AssertionError if the test fails. But I agree, simpler is better. (Hence my combined "alias" test, btw.)

@hynek
Copy link
Owner

hynek commented Jan 22, 2015

one more quick thing: I thing the changelog should refer the PR that actually got merged (i.e. 44) not a related issue.

Thanks again, will merge afterwards!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 45e390d on wbolster:issue-43 into 203cc04 on hynek:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 22fd35f on wbolster:issue-43 into 203cc04 on hynek:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 22fd35f on wbolster:issue-43 into 203cc04 on hynek:master.

@hynek
Copy link
Owner

hynek commented Jan 22, 2015

Thanks!

hynek added a commit that referenced this pull request Jan 22, 2015
Add add_log_level() and add_logger_name() stdlib processors
@hynek hynek merged commit 672bc93 into hynek:master Jan 22, 2015
@wbolster wbolster deleted the issue-43 branch January 23, 2015 10:45
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.

4 participants