feat(logging): Introduce spdlog and remove simple_logger and screen_logger #2083
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.
Behavior changes:
[tools.simple_logger]fast_flush
has been changed toWhether to flush logs every second
rather than flush on every log.[tools.screen_logger]
have been removed.F
(Fatal) is changed toC
(Critical)yyyyMMdd_hhmmss_SSS
tolog.[d+]*.txt
ps -T
command, it's helpful for debugging.I2024-08-01 19:45:16.8 (1722512716008970768 1c65af) replica.replica18.0200656f0072d04f: replica_stub.cpp:1303:on_group_check(): <message>
toI2024-08-01 12:01:24.710 53193 replica.replica1.216400909301791341 replica_stub.cpp:1115:on_group_check(): <message>
Performance:
The LoggingTest.SimpleBenchmark shows that it can reduce about 50% time cost when
set logging_test_simple_benchmark_loops to 1,000,000.