Skip to content

Commit 097068d

Browse files
authored
feat(logging): Introduce spdlog to thirdparty (#2084)
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.
1 parent 34ab9cb commit 097068d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

thirdparty/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,19 @@ ExternalProject_Add(http-parser
473473
DOWNLOAD_NO_PROGRESS true
474474
)
475475

476+
ExternalProject_Add(spdlog
477+
URL https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
478+
URL_MD5 f2c3f15c20e67b261836ff7bfda302cf
479+
PATCH_COMMAND ""
480+
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT}
481+
-DSPDLOG_ENABLE_PCH=ON
482+
-DSPDLOG_BUILD_PIC=ON
483+
-DSPDLOG_FMT_EXTERNAL=ON
484+
-DSPDLOG_NO_EXCEPTIONS=ON
485+
-Dfmt_DIR=${TP_OUTPUT}/lib/cmake/fmt
486+
BUILD_COMMAND make -j${PARALLEL}
487+
INSTALL_COMMAND make install
488+
DEPENDS fmt
489+
DOWNLOAD_EXTRACT_TIMESTAMP true
490+
DOWNLOAD_NO_PROGRESS true
491+
)

0 commit comments

Comments
 (0)