feat(logging): Introduce spdlog and remove simple_logger and screen_logger#2083
Open
acelyc111 wants to merge 2 commits intoapache:masterfrom
Open
feat(logging): Introduce spdlog and remove simple_logger and screen_logger#2083acelyc111 wants to merge 2 commits intoapache:masterfrom
acelyc111 wants to merge 2 commits intoapache:masterfrom
Conversation
empiredan
pushed a commit
that referenced
this pull request
Aug 1, 2024
This is a previous work of #2083. This patch introduces [spdlog](https://github.com/gabime/spdlog) as a thirdparty to prepare the docker image, then the #2083 can use it to run CI. spdlog is a very fast C++ logging library, you can see the benchmarks: https://github.com/gabime/spdlog?tab=readme-ov-file#benchmarks. spdlog using `libfmt` to format message content, it is fast and compatible with the current logging practice in Pegasus. It's a good choice to replace the current `simple_logger` or `screen_logger` implementation in Pegasus.
c1d12ff to
025a2d1
Compare
6911ca1 to
3b732c1
Compare
cc824c6 to
09c908a
Compare
04dc2f8 to
242b1c1
Compare
6d4ba98 to
3501f1b
Compare
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.
Behavior changes:
[tools.simple_logger]fast_flushhas been changed toWhether to flush logs every secondrather than flush on every log.[tools.screen_logger]have been removed.F(Fatal) is changed toC(Critical)yyyyMMdd_hhmmss_SSStolog.[d+]*.txtps -Tcommand, 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.