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

@wbolster wbolster commented Jan 22, 2015

See #43.

@wbolster
Copy link
Author

@wbolster wbolster commented Jan 22, 2015

@hynek please review

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@hynek
Copy link
Owner

@hynek 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!

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@wbolster
Copy link
Author

@wbolster wbolster commented Jan 22, 2015

@hynek take 2

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

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

@hynek hynek Jan 22, 2015

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

Loading

Copy link
Author

@wbolster wbolster Jan 22, 2015

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.)

Loading

@hynek
Copy link
Owner

@hynek 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!

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@coveralls
Copy link

@coveralls coveralls commented Jan 22, 2015

Coverage Status

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

Loading

@hynek
Copy link
Owner

@hynek hynek commented Jan 22, 2015

Thanks!

Loading

hynek added a commit that referenced this issue Jan 22, 2015
Add add_log_level() and add_logger_name() stdlib processors
@hynek hynek merged commit 672bc93 into hynek:master Jan 22, 2015
1 check passed
Loading
@wbolster wbolster deleted the issue-43 branch Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants