Skip to content

Commit

Permalink
feat(logging): Introduce spdlog to thirdparty (#2084)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acelyc111 authored Aug 1, 2024
1 parent 34ab9cb commit 097068d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,19 @@ ExternalProject_Add(http-parser
DOWNLOAD_NO_PROGRESS true
)

ExternalProject_Add(spdlog
URL https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
URL_MD5 f2c3f15c20e67b261836ff7bfda302cf
PATCH_COMMAND ""
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${TP_OUTPUT}
-DSPDLOG_ENABLE_PCH=ON
-DSPDLOG_BUILD_PIC=ON
-DSPDLOG_FMT_EXTERNAL=ON
-DSPDLOG_NO_EXCEPTIONS=ON
-Dfmt_DIR=${TP_OUTPUT}/lib/cmake/fmt
BUILD_COMMAND make -j${PARALLEL}
INSTALL_COMMAND make install
DEPENDS fmt
DOWNLOAD_EXTRACT_TIMESTAMP true
DOWNLOAD_NO_PROGRESS true
)

0 comments on commit 097068d

Please sign in to comment.