Switch to using domain filtering not log_type (#483) #18
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.
This looks like it is a more correct way of doing this.
Given we have no agreed hierarchy as part of OpenRiak, will use [backend, leveled] as a start.
The leveled_log code is not aligned well with the expectations of riak kernel logger. In particular log function calls were centralised, and so MFA metadata is irrelevant.
This change implements the log function calls as a macro, so that the should_i_log logic cna be maintained, but MFA metadata will be correctly present in the log. It also ends the practice of adding the pid() directly to the log, instead relying on the metadata
Format via erlfmt
ensure logger:allow/2 is called
Will be filtered by global and ?MODULE log filters.
Outstanding code coverage issue caused by detecting
falsebranch when macro is substituted over multiple lines.Add missing space to logs with no db_id
Coverage
code coverage is an issue with the switch to macros for logging. Not every log line will have a
falsefrom the log allow - and that will fail code coverage ... but only if the log covers multiple lines.Most logs covering multiple lines, do do needlessly. So avoid the code coverage issue by making those logs single line.
Update include/leveled.hrl
Updates post review
Remove unused get_log
Code uses get_loglevel/1