-
Notifications
You must be signed in to change notification settings - Fork 2
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
TECH-4787: support progname and message block #34
Merged
ColinDKelley
merged 15 commits into
master
from
TECH-4787/support_progname_and_message_block
Sep 3, 2020
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c77c0ed
TECH-4787: add test for add() using progname and message block
ColinDKelley 8461260
TECH-4787: test with/without context X with/without log level enabled
ColinDKelley b3d3649
TECH-4787: extend tests to all levels
ColinDKelley eca53b1
TECH-4787: extract LOG_LEVEL_NAMES_TO_SEVERITY
ColinDKelley aec156c
TECH-4787: use class_eval and __FILE__, __LINE__
ColinDKelley dd9e841
TECH-4787: add test for inline context and no progname; add support f…
ColinDKelley 2174d3d
TECH-4787: handle corner case of progname+context+message block when …
ColinDKelley 634e366
TECH-4787: bump version to 0.10.0.pre.1; update README and CHANGELOG
ColinDKelley c202488
TECH-4787: update CHANGELOG to add missing link
ColinDKelley 17f2f1e
TECH-4787: switch format to <progname>: message; pass progname throug…
ColinDKelley d311699
TECH-4787: simplify if/else to ||
ColinDKelley 36154e4
TECH-4787: delete :progname from context hash when we added it there
ColinDKelley 822f94c
TECH-4787: add comment about ::Logger#add interface compatibility
ColinDKelley 549e570
TECH-4787: restructure README including documenting reset!
ColinDKelley 6b70cfe
TECH-4787: bump version to 0.10.0; update CHANGELOG
ColinDKelley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jebentier I added this back as I had it, so that the tunneled
progname
doesn't live on in the context hash.Usually I'd avoid
delete
since that mutates thecontext
here. But it's really succinct, and performs best...and I figured no one else but our code above would be putting a:progname
key into the context and callingadd
in the block form with a context hash! LMK if you disagree.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay for now. Maybe something to not in the README is that through this implementation you're able to specify
progname
using two different method (flip it to a feature 😉 )logger.info('request') { message }
andlogger.info(progname: 'request') { message }
will pass progname down to the formatter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jebentier Can you take a look at the README restructure here: 549e570