Skip to content

Commit

Permalink
feat(Common/Logging): switch logging system to spdlog
Browse files Browse the repository at this point in the history
  • Loading branch information
Winfidonarleyan committed Aug 20, 2023
1 parent 5a1fdb2 commit 319ba82
Show file tree
Hide file tree
Showing 156 changed files with 12,219 additions and 2,202 deletions.
1 change: 1 addition & 0 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_subdirectory(stdfs)
add_subdirectory(threads)
add_subdirectory(utf8cpp)
add_subdirectory(valgrind)
add_subdirectory(spdlog)

if ((APPS_BUILD AND (NOT APPS_BUILD STREQUAL "none")) OR BUILD_TOOLS_DB_IMPORT)
add_subdirectory(mysql)
Expand Down
4 changes: 4 additions & 0 deletions deps/PackageList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ efws (Entropia File System Watcher - crossplatform file system watcher)
DPP D++ Extremely Lightweight C++ Discord Library
https://github.com/brainboxdotcc/DPP
Version: 10.0.2

spdlog (Very fast, header-only/compiled, C++ logging library)
https://github.com/gabime/spdlog
Version: https://github.com/gabime/spdlog/commit/811bc4c7a9a4b192c6fa59109476e214f0eb50c0
47 changes: 47 additions & 0 deletions deps/spdlog/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# This file is part of the WarheadCore Project. See AUTHORS file for Copyright information
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)

# Group sources
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})

add_library(spdlog STATIC ${PRIVATE_SOURCES})

target_compile_definitions(spdlog
PUBLIC
SPDLOG_COMPILED_LIB
SPDLOG_FMT_EXTERNAL)

CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES)

target_include_directories(spdlog
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE
${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(spdlog
PRIVATE
warhead-dependency-interface
PUBLIC
fmt
threads)

set_target_properties(spdlog
PROPERTIES
FOLDER
"deps")
26 changes: 26 additions & 0 deletions deps/spdlog/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
The MIT License (MIT)

Copyright (c) 2016 Gabi Melman.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-- NOTE: Third party dependency used by this software --
This software depends on the fmt lib (MIT License),
and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst

Loading

0 comments on commit 319ba82

Please sign in to comment.