refactor(log): adjust log level and macro names #1200
Merged
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.
#1199
For historical reasons, the log levels of Pegasus is a bit of confused and not consistent with other well known and wildly used logging systems. This patch aim to resolve this issuse, includes the following changes:
libevent
and Pegasus, see src/reporter/pegasus_counter_reporter.cppsasl
and Pegasus, see src/runtime/security/sasl_init.cppLOG_LEVEL_INFORMATION
toLOG_LEVEL_INFO
dinfo
->LOG_DEBUG
ddebug
->LOG_INFO
dwarn
->LOG_WARNING
derror
->LOG_ERROR
dfatal
->LOG_FATAL
Of course, this patch will take effect on thousands of source files, I used IDE to replace the macros, and I've checked these files one by one manually. Reviewers could check the following files to save time:
TODO: log levels using
fmt
(e.g.dinfo_f
,dwarn_f
) is left as before and will be refactored in the next patch.Compatibility
Log levels of DEBUG and INFO are exchanged, should be mentioned in release note.