Standardise Error Logging - #13608
Merged
Merged
Conversation
space-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 12, 2020
adfoster-r7
reviewed
Jun 15, 2020
dwelch-r7
reviewed
Jun 15, 2020
dwelch-r7
reviewed
Jun 15, 2020
adfoster-r7
reviewed
Jun 15, 2020
adfoster-r7
reviewed
Jun 16, 2020
|
|
||
| global_log_level = get_log_level(src) | ||
|
|
||
| # If the source has no associated log_level, the default log level is used |
Contributor
There was a problem hiding this comment.
In what scenario does this code path occur?
Contributor
Author
There was a problem hiding this comment.
If the LogDispatcher doesn't have a source set, the above src will eventually reach this line, where src isn't a key in log_levels and nil is returned.
adfoster-r7
reviewed
Jun 16, 2020
adfoster-r7
reviewed
Jun 16, 2020
adfoster-r7
reviewed
Jun 17, 2020
adfoster-r7
reviewed
Jun 17, 2020
agalway-r7
force-pushed
the
standardise-elog
branch
3 times, most recently
from
June 17, 2020 12:21
68afe85 to
fd2f10e
Compare
acammack-r7
previously requested changes
Jun 18, 2020
acammack-r7
left a comment
Contributor
There was a problem hiding this comment.
Good start on fixing up the elog copypasta! There's also a lot of logging in the rex gems to consider as well with this sort of change.
agalway-r7
force-pushed
the
standardise-elog
branch
from
June 19, 2020 10:18
088dad9 to
1b8ae20
Compare
adfoster-r7
previously requested changes
Jun 19, 2020
agalway-r7
force-pushed
the
standardise-elog
branch
2 times, most recently
from
June 22, 2020 11:12
50b346c to
0cca7e3
Compare
adfoster-r7
dismissed stale reviews from acammack-r7 and themself
June 22, 2020 11:23
Requests actioned
agalway-r7
force-pushed
the
standardise-elog
branch
from
June 22, 2020 11:52
0cca7e3 to
1a2bf98
Compare
Contributor
Release NotesUpdates the Error Logging API to take an error object and updates the existing |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Important changes are in
logging/log_dispatcher.rb, everything else is just cleanup.This PR attempts to standardise
elogusage by restricting it's API to three variables; a message, a source, and anException.msgis simple string. If this is the only variable passed toelog, no additional parsing is performed.srcdictates the LogSource. This is most commonlycorebut can also behdwbridgeandMeterpretererroris the exception that caused the error, if any. The.class&.messagevalues of an exception are always extracted and added to the log message. If the global log level is >= 1, the the Exception.backtraceis also added.Standardizing error logging will allow us to send error logs to
framework.logand improve functionality of thedebugcommand #13430.Happy Friday! One of the files I cleaned up has an Easter Egg in it, first one to find it gets a prize.