mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
Merge branch 'static-lib' of https://github.com/gabime/spdlog into static-lib
This commit is contained in:
commit
92387b1527
@ -45,7 +45,6 @@ else()
|
|||||||
set(SPDLOG_MASTER_PROJECT OFF)
|
set(SPDLOG_MASTER_PROJECT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(SPDLOG_STATIC_LIB "Build as static lib" ON)
|
|
||||||
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
option(SPDLOG_BUILD_EXAMPLES "Build examples" ${SPDLOG_MASTER_PROJECT})
|
||||||
option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)" OFF)
|
option(SPDLOG_BUILD_BENCH "Build benchmarks (Requires https://github.com/google/benchmark.git to be installed)" OFF)
|
||||||
option(SPDLOG_BUILD_TESTS "Build tests" ON)
|
option(SPDLOG_BUILD_TESTS "Build tests" ON)
|
||||||
@ -55,29 +54,31 @@ option(SPDLOG_INSTALL "Generate the install target." ${SPDLOG_MASTER_PROJECT})
|
|||||||
set(HEADER_BASE "${CMAKE_CURRENT_SOURCE_DIR}/include/spdlog")
|
set(HEADER_BASE "${CMAKE_CURRENT_SOURCE_DIR}/include/spdlog")
|
||||||
|
|
||||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||||
message(STATUS "Static lib: " ${SPDLOG_STATIC_LIB})
|
|
||||||
|
|
||||||
if(SPDLOG_STATIC_LIB)
|
# Build static lib
|
||||||
add_definitions(-DSPDLOG_STATIC_LIB)
|
set(SRC_BASE "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||||
set(SRC_BASE "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
set(STATIC_SRC_FILES "${SRC_BASE}/spdlog.cpp")
|
||||||
set(SRC_FILES "${SRC_BASE}/spdlog.cpp")
|
add_library(spdlog_static STATIC ${STATIC_SRC_FILES})
|
||||||
add_library(spdlog STATIC ${SRC_FILES})
|
add_library(spdlog::static ALIAS spdlog_static)
|
||||||
target_include_directories(spdlog PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
|
target_compile_definitions(spdlog_static PUBLIC SPDLOG_STATIC_LIB )
|
||||||
target_link_libraries(spdlog)
|
target_include_directories(spdlog_static PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
|
||||||
else()
|
set_target_properties(spdlog_static PROPERTIES OUTPUT_NAME "spdlog")
|
||||||
add_library(spdlog INTERFACE)
|
set_target_properties(spdlog_static PROPERTIES DEBUG_POSTFIX "-debug")
|
||||||
target_include_directories(spdlog INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(spdlog::spdlog ALIAS spdlog)
|
# Headr only
|
||||||
|
add_library(spdlog_header_only INTERFACE)
|
||||||
|
target_include_directories(spdlog_header_only INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
|
||||||
|
add_library(spdlog::header_only ALIAS spdlog_header_only)
|
||||||
|
|
||||||
if(SPDLOG_FMT_EXTERNAL AND NOT TARGET fmt::fmt)
|
if(SPDLOG_FMT_EXTERNAL AND NOT TARGET fmt::fmt)
|
||||||
find_package(fmt REQUIRED CONFIG)
|
find_package(fmt REQUIRED CONFIG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SPDLOG_FMT_EXTERNAL)
|
if(SPDLOG_FMT_EXTERNAL)
|
||||||
target_compile_definitions(spdlog INTERFACE SPDLOG_FMT_EXTERNAL)
|
target_compile_definitions(spdlog_static INTERFACE SPDLOG_FMT_EXTERNAL)
|
||||||
target_link_libraries(spdlog INTERFACE fmt::fmt)
|
target_link_libraries(spdlog_static INTERFACE fmt::fmt)
|
||||||
|
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL)
|
||||||
|
target_link_libraries(spdlog_header_only INTERFACE fmt::fmt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SPDLOG_BUILD_EXAMPLES)
|
if(SPDLOG_BUILD_EXAMPLES)
|
||||||
@ -97,10 +98,7 @@ endif()
|
|||||||
# install
|
# install
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
install(DIRECTORY ${HEADER_BASE} DESTINATION include)
|
install(DIRECTORY ${HEADER_BASE} DESTINATION include)
|
||||||
|
install(TARGETS spdlog_static ARCHIVE DESTINATION lib)
|
||||||
if(SPDLOG_STATIC_LIB)
|
|
||||||
install(TARGETS spdlog ARCHIVE DESTINATION lib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------------
|
||||||
# register project in CMake user registry
|
# register project in CMake user registry
|
||||||
|
@ -33,16 +33,16 @@ find_package(Threads REQUIRED)
|
|||||||
find_package(benchmark CONFIG REQUIRED)
|
find_package(benchmark CONFIG REQUIRED)
|
||||||
|
|
||||||
add_executable(bench bench.cpp)
|
add_executable(bench bench.cpp)
|
||||||
target_link_libraries(bench PRIVATE spdlog::spdlog Threads::Threads)
|
target_link_libraries(bench PRIVATE spdlog::static Threads::Threads)
|
||||||
|
|
||||||
add_executable(async_bench async_bench.cpp)
|
add_executable(async_bench async_bench.cpp)
|
||||||
target_link_libraries(async_bench PRIVATE spdlog::spdlog Threads::Threads)
|
target_link_libraries(async_bench PRIVATE spdlog::static Threads::Threads)
|
||||||
|
|
||||||
add_executable(latency latency.cpp)
|
add_executable(latency latency.cpp)
|
||||||
target_link_libraries(latency PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads)
|
target_link_libraries(latency PRIVATE benchmark::benchmark spdlog::static Threads::Threads)
|
||||||
|
|
||||||
|
|
||||||
add_executable(formatter-bench formatter-bench.cpp)
|
add_executable(formatter-bench formatter-bench.cpp)
|
||||||
target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads)
|
target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::static Threads::Threads)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
CXX ?= g++
|
|
||||||
CXXFLAGS = -march=native -Wall -Wextra -pedantic -Wconversion -std=c++11 -pthread -I../include -fmax-errors=1
|
|
||||||
CXX_RELEASE_FLAGS = -O3 -flto -Wl,--no-as-needed
|
|
||||||
|
|
||||||
|
|
||||||
binaries=bench async_bench latency formatter-bench
|
|
||||||
|
|
||||||
all: $(binaries)
|
|
||||||
|
|
||||||
bench: bench.cpp
|
|
||||||
$(CXX) bench.cpp -o bench $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
async_bench: async_bench.cpp
|
|
||||||
$(CXX) async_bench.cpp -o async_bench $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
latency: latency.cpp
|
|
||||||
$(CXX) latency.cpp -o latency $(CXXFLAGS) $(CXX_RELEASE_FLAGS) -lbenchmark
|
|
||||||
|
|
||||||
|
|
||||||
formatter-bench: formatter-bench.cpp
|
|
||||||
$(CXX) formatter-bench.cpp -o formatter-bench $(CXXFLAGS) $(CXX_RELEASE_FLAGS) -lbenchmark
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o logs/* latecy_logs $(binaries)
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
@ -34,14 +34,14 @@ find_package(Threads REQUIRED)
|
|||||||
add_executable(example example.cpp)
|
add_executable(example example.cpp)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||||
find_library(log-lib log)
|
find_library(log-lib log)
|
||||||
target_link_libraries(example spdlog::spdlog Threads::Threads log)
|
target_link_libraries(example spdlog::static Threads::Threads log)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(example spdlog::spdlog Threads::Threads)
|
target_link_libraries(example spdlog::static Threads::Threads)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_executable(multisink multisink.cpp)
|
add_executable(multisink multisink.cpp)
|
||||||
target_link_libraries(multisink spdlog::spdlog Threads::Threads)
|
target_link_libraries(multisink spdlog::static Threads::Threads)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
CXX ?= g++
|
|
||||||
CXX_FLAGS = -Wall -Wextra -pedantic -std=c++11 -pthread -I../include -fmax-errors=1 -Wconversion
|
|
||||||
CXX_RELEASE_FLAGS = -O3 -march=native
|
|
||||||
CXX_DEBUG_FLAGS= -g
|
|
||||||
|
|
||||||
all: example
|
|
||||||
debug: example-debug
|
|
||||||
|
|
||||||
example: example.cpp
|
|
||||||
$(CXX) example.cpp -o example $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
example-debug: example.cpp
|
|
||||||
$(CXX) example.cpp -o example-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o logs/*.txt example example-debug
|
|
||||||
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
||||||
rebuild-debug: clean debug
|
|
@ -1,22 +0,0 @@
|
|||||||
#-Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded
|
|
||||||
CXX ?= g++
|
|
||||||
CXX_FLAGS = -Wall -Wextra -pedantic -std=c++11 -pthread -I../include -fmax-errors=1 -Wconversion -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-weak-vtables -Wno-global-constructors
|
|
||||||
CXX_RELEASE_FLAGS = -O3 -march=native
|
|
||||||
CXX_DEBUG_FLAGS= -g
|
|
||||||
|
|
||||||
all: example
|
|
||||||
debug: example-debug
|
|
||||||
|
|
||||||
example: example.cpp
|
|
||||||
$(CXX) example.cpp -o example $(CXX_FLAGS) $(CXX_RELEASE_FLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
example-debug: example.cpp
|
|
||||||
$(CXX) example.cpp -o example-debug $(CXX_FLAGS) $(CXX_DEBUG_FLAGS) $(CXXFLAGS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o logs/*.txt example example-debug
|
|
||||||
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
||||||
rebuild-debug: clean debug
|
|
@ -1,26 +0,0 @@
|
|||||||
CXX = clang++
|
|
||||||
CXXFLAGS = -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -I../include
|
|
||||||
CXX_RELEASE_FLAGS = -O2
|
|
||||||
CXX_DEBUG_FLAGS= -g
|
|
||||||
|
|
||||||
|
|
||||||
all: example
|
|
||||||
debug: example-debug
|
|
||||||
|
|
||||||
example: example.cpp
|
|
||||||
$(CXX) example.cpp -o example-clang $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
example-debug: example.cpp
|
|
||||||
$(CXX) example.cpp -o example-clang-debug $(CXXFLAGS) $(CXX_DEBUG_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o logs/*.txt example-clang example-clang-debug
|
|
||||||
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
||||||
rebuild-debug: clean debug
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
CXX ?= g++
|
|
||||||
CXXFLAGS = -D_WIN32_WINNT=0x600 -march=native -Wall -Wextra -pedantic -std=gnu++0x -pthread -Wl,--no-as-needed -I../include
|
|
||||||
CXX_RELEASE_FLAGS = -O3
|
|
||||||
CXX_DEBUG_FLAGS= -g
|
|
||||||
|
|
||||||
|
|
||||||
all: example
|
|
||||||
debug: example-debug
|
|
||||||
|
|
||||||
example: example.cpp
|
|
||||||
$(CXX) example.cpp -o example $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
example-debug: example.cpp
|
|
||||||
$(CXX) example.cpp -o example-debug $(CXXFLAGS) $(CXX_DEBUG_FLAGS)
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o logs/*.txt example example-debug
|
|
||||||
|
|
||||||
|
|
||||||
rebuild: clean all
|
|
||||||
rebuild-debug: clean debug
|
|
||||||
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
|||||||
// Copyright(c) 2015 Gabi Melman.
|
// Copyright(c) 2015 Gabi Melman.
|
||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
|
||||||
// spdlog usage example
|
// spdlog usage example
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 15
|
|
||||||
VisualStudioVersion = 15.0.27703.2018
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "spdlog", "spdlog", "{7FC6AB76-AD88-4135-888C-0568E81475AF}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\async.h = ..\include\spdlog\async.h
|
|
||||||
..\include\spdlog\async_logger.h = ..\include\spdlog\async_logger.h
|
|
||||||
..\include\spdlog\common.h = ..\include\spdlog\common.h
|
|
||||||
..\include\spdlog\formatter.h = ..\include\spdlog\formatter.h
|
|
||||||
..\include\spdlog\logger.h = ..\include\spdlog\logger.h
|
|
||||||
..\include\spdlog\spdlog.h = ..\include\spdlog\spdlog.h
|
|
||||||
..\include\spdlog\tweakme.h = ..\include\spdlog\tweakme.h
|
|
||||||
..\include\spdlog\version.h = ..\include\spdlog\version.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "details", "details", "{08E93803-E650-42D9-BBB4-3C16979F850E}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\details\async_logger_impl.h = ..\include\spdlog\details\async_logger_impl.h
|
|
||||||
..\include\spdlog\details\circular_q.h = ..\include\spdlog\details\circular_q.h
|
|
||||||
..\include\spdlog\details\console_globals.h = ..\include\spdlog\details\console_globals.h
|
|
||||||
..\include\spdlog\details\file_helper.h = ..\include\spdlog\details\file_helper.h
|
|
||||||
..\include\spdlog\details\fmt_helper.h = ..\include\spdlog\details\fmt_helper.h
|
|
||||||
..\include\spdlog\details\log_msg.h = ..\include\spdlog\details\log_msg.h
|
|
||||||
..\include\spdlog\details\logger_impl.h = ..\include\spdlog\details\logger_impl.h
|
|
||||||
..\include\spdlog\details\mpmc_blocking_q.h = ..\include\spdlog\details\mpmc_blocking_q.h
|
|
||||||
..\include\spdlog\details\null_mutex.h = ..\include\spdlog\details\null_mutex.h
|
|
||||||
..\include\spdlog\details\os.h = ..\include\spdlog\details\os.h
|
|
||||||
..\include\spdlog\details\pattern_formatter.h = ..\include\spdlog\details\pattern_formatter.h
|
|
||||||
..\include\spdlog\details\periodic_worker.h = ..\include\spdlog\details\periodic_worker.h
|
|
||||||
..\include\spdlog\details\registry.h = ..\include\spdlog\details\registry.h
|
|
||||||
..\include\spdlog\details\spdlog_impl.h = ..\include\spdlog\details\spdlog_impl.h
|
|
||||||
..\include\spdlog\details\thread_pool.h = ..\include\spdlog\details\thread_pool.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fmt", "fmt", "{82378DE1-8463-4F91-91A0-C2C40E2AEA2A}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\fmt\fmt.h = ..\include\spdlog\fmt\fmt.h
|
|
||||||
..\include\spdlog\fmt\ostr.h = ..\include\spdlog\fmt\ostr.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bundled", "bundled", "{D9CA4494-80D1-48D1-A897-D3564F7B27FF}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\fmt\bundled\format.cc = ..\include\spdlog\fmt\bundled\format.cc
|
|
||||||
..\include\spdlog\fmt\bundled\format.h = ..\include\spdlog\fmt\bundled\format.h
|
|
||||||
..\include\spdlog\fmt\bundled\LICENSE.rst = ..\include\spdlog\fmt\bundled\LICENSE.rst
|
|
||||||
..\include\spdlog\fmt\bundled\ostream.cc = ..\include\spdlog\fmt\bundled\ostream.cc
|
|
||||||
..\include\spdlog\fmt\bundled\ostream.h = ..\include\spdlog\fmt\bundled\ostream.h
|
|
||||||
..\include\spdlog\fmt\bundled\posix.cc = ..\include\spdlog\fmt\bundled\posix.cc
|
|
||||||
..\include\spdlog\fmt\bundled\posix.h = ..\include\spdlog\fmt\bundled\posix.h
|
|
||||||
..\include\spdlog\fmt\bundled\printf.cc = ..\include\spdlog\fmt\bundled\printf.cc
|
|
||||||
..\include\spdlog\fmt\bundled\printf.h = ..\include\spdlog\fmt\bundled\printf.h
|
|
||||||
..\include\spdlog\fmt\bundled\time.h = ..\include\spdlog\fmt\bundled\time.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sinks", "sinks", "{27D16BB9-2B81-4F61-80EC-0C7A777248E4}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\sinks\android_sink.h = ..\include\spdlog\sinks\android_sink.h
|
|
||||||
..\include\spdlog\sinks\ansicolor_sink.h = ..\include\spdlog\sinks\ansicolor_sink.h
|
|
||||||
..\include\spdlog\sinks\base_sink.h = ..\include\spdlog\sinks\base_sink.h
|
|
||||||
..\include\spdlog\sinks\dist_sink.h = ..\include\spdlog\sinks\dist_sink.h
|
|
||||||
..\include\spdlog\sinks\file_sinks.h = ..\include\spdlog\sinks\file_sinks.h
|
|
||||||
..\include\spdlog\sinks\msvc_sink.h = ..\include\spdlog\sinks\msvc_sink.h
|
|
||||||
..\include\spdlog\sinks\null_sink.h = ..\include\spdlog\sinks\null_sink.h
|
|
||||||
..\include\spdlog\sinks\ostream_sink.h = ..\include\spdlog\sinks\ostream_sink.h
|
|
||||||
..\include\spdlog\sinks\sink.h = ..\include\spdlog\sinks\sink.h
|
|
||||||
..\include\spdlog\sinks\stdout_color_sinks.h = ..\include\spdlog\sinks\stdout_color_sinks.h
|
|
||||||
..\include\spdlog\sinks\stdout_sinks.h = ..\include\spdlog\sinks\stdout_sinks.h
|
|
||||||
..\include\spdlog\sinks\syslog_sink.h = ..\include\spdlog\sinks\syslog_sink.h
|
|
||||||
..\include\spdlog\sinks\wincolor_sink.h = ..\include\spdlog\sinks\wincolor_sink.h
|
|
||||||
..\include\spdlog\sinks\windebug_sink.h = ..\include\spdlog\sinks\windebug_sink.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{08E93803-E650-42D9-BBB4-3C16979F850E} = {7FC6AB76-AD88-4135-888C-0568E81475AF}
|
|
||||||
{82378DE1-8463-4F91-91A0-C2C40E2AEA2A} = {7FC6AB76-AD88-4135-888C-0568E81475AF}
|
|
||||||
{D9CA4494-80D1-48D1-A897-D3564F7B27FF} = {82378DE1-8463-4F91-91A0-C2C40E2AEA2A}
|
|
||||||
{27D16BB9-2B81-4F61-80EC-0C7A777248E4} = {7FC6AB76-AD88-4135-888C-0568E81475AF}
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {1BF53532-C5DC-4236-B195-9E17CBE40A48}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,167 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="example.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{9E5AB93A-0CCE-4BAC-9FCB-0FC9CB5EB8D2}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<RootNamespace>.</RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PrecompiledHeaderFile />
|
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PrecompiledHeaderFile>
|
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<PrecompiledHeaderOutputFile>
|
|
||||||
</PrecompiledHeaderOutputFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PrecompiledHeaderFile />
|
|
||||||
<PrecompiledHeaderOutputFile />
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<PrecompiledHeaderFile>
|
|
||||||
</PrecompiledHeaderFile>
|
|
||||||
<PrecompiledHeaderOutputFile>
|
|
||||||
</PrecompiledHeaderOutputFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/async_logger.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/sinks/sink.h"
|
#include "spdlog/sinks/sink.h"
|
||||||
#include "spdlog/details/thread_pool.h"
|
#include "spdlog/details/thread_pool.h"
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/common.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace level {
|
namespace level {
|
||||||
static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES;
|
static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES;
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/file_helper.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/log_msg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
#include "spdlog/sinks/sink.h"
|
#include "spdlog/sinks/sink.h"
|
||||||
|
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/os.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/details/fmt_helper.h"
|
#include "spdlog/details/fmt_helper.h"
|
||||||
#include "spdlog/details/log_msg.h"
|
#include "spdlog/details/log_msg.h"
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
|
@ -2,8 +2,14 @@
|
|||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/periodic_worker.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace details {
|
namespace details {
|
||||||
|
|
||||||
SPDLOG_INLINE periodic_worker::periodic_worker(const std::function<void()> &callback_fun, std::chrono::seconds interval)
|
SPDLOG_INLINE periodic_worker::periodic_worker(const std::function<void()> &callback_fun, std::chrono::seconds interval)
|
||||||
{
|
{
|
||||||
active_ = (interval > std::chrono::seconds::zero());
|
active_ = (interval > std::chrono::seconds::zero());
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/registry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/details/periodic_worker.h"
|
#include "spdlog/details/periodic_worker.h"
|
||||||
#include "spdlog/logger.h"
|
#include "spdlog/logger.h"
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/details/thread_pool.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "spdlog/details/fmt_helper.h"
|
|
||||||
#include "spdlog/details/log_msg.h"
|
#include "spdlog/details/log_msg.h"
|
||||||
#include "spdlog/details/mpmc_blocking_q.h"
|
#include "spdlog/details/mpmc_blocking_q.h"
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
@ -86,7 +85,7 @@ struct async_msg
|
|||||||
, source(m.source)
|
, source(m.source)
|
||||||
, worker_ptr(std::move(worker))
|
, worker_ptr(std::move(worker))
|
||||||
{
|
{
|
||||||
fmt_helper::append_string_view(m.payload, raw);
|
raw.append(m.payload.data(), m.payload.data() + m.payload.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
async_msg(async_logger_ptr &&worker, async_msg_type the_type)
|
async_msg(async_logger_ptr &&worker, async_msg_type the_type)
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/logger.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/sinks/sink.h"
|
#include "spdlog/sinks/sink.h"
|
||||||
#include "spdlog/details/pattern_formatter.h"
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/ansicolor_sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
|
|
||||||
template<typename TargetStream, typename ConsoleMutex>
|
template<typename TargetStream, typename ConsoleMutex>
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/base_sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/details/pattern_formatter.h"
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
|
||||||
|
43
include/spdlog/sinks/basic_file_sink-inl.h
Normal file
43
include/spdlog/sinks/basic_file_sink-inl.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||||
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/basic_file_sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "spdlog/common.h"
|
||||||
|
#include "spdlog/details/os.h"
|
||||||
|
|
||||||
|
namespace spdlog {
|
||||||
|
namespace sinks {
|
||||||
|
|
||||||
|
template<typename Mutex>
|
||||||
|
SPDLOG_INLINE basic_file_sink<Mutex>::basic_file_sink(const filename_t &filename, bool truncate)
|
||||||
|
{
|
||||||
|
file_helper_.open(filename, truncate);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Mutex>
|
||||||
|
SPDLOG_INLINE const filename_t &basic_file_sink<Mutex>::filename() const
|
||||||
|
{
|
||||||
|
return file_helper_.filename();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Mutex>
|
||||||
|
SPDLOG_INLINE void basic_file_sink<Mutex>::sink_it_(const details::log_msg &msg)
|
||||||
|
{
|
||||||
|
fmt::memory_buffer formatted;
|
||||||
|
sink::formatter_->format(msg, formatted);
|
||||||
|
file_helper_.write(formatted);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename Mutex>
|
||||||
|
SPDLOG_INLINE void basic_file_sink<Mutex>::flush_()
|
||||||
|
{
|
||||||
|
file_helper_.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace sinks
|
||||||
|
} // namespace spdlog
|
@ -23,28 +23,12 @@ template<typename Mutex>
|
|||||||
class basic_file_sink final : public base_sink<Mutex>
|
class basic_file_sink final : public base_sink<Mutex>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit basic_file_sink(const filename_t &filename, bool truncate = false)
|
explicit basic_file_sink(const filename_t &filename, bool truncate = false);
|
||||||
{
|
const filename_t &filename() const;
|
||||||
file_helper_.open(filename, truncate);
|
|
||||||
}
|
|
||||||
|
|
||||||
const filename_t &filename() const
|
|
||||||
{
|
|
||||||
return file_helper_.filename();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const details::log_msg &msg) override
|
void sink_it_(const details::log_msg &msg) override;
|
||||||
{
|
void flush_() override;
|
||||||
fmt::memory_buffer formatted;
|
|
||||||
sink::formatter_->format(msg, formatted);
|
|
||||||
file_helper_.write(formatted);
|
|
||||||
}
|
|
||||||
|
|
||||||
void flush_() override
|
|
||||||
{
|
|
||||||
file_helper_.flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
details::file_helper file_helper_;
|
details::file_helper file_helper_;
|
||||||
@ -71,3 +55,7 @@ inline std::shared_ptr<logger> basic_logger_st(const std::string &logger_name, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
||||||
|
|
||||||
|
#ifdef SPDLOG_HEADER_ONLY
|
||||||
|
#include "basic_file_sink-inl.h"
|
||||||
|
#endif
|
@ -11,6 +11,7 @@
|
|||||||
#include "spdlog/details/null_mutex.h"
|
#include "spdlog/details/null_mutex.h"
|
||||||
#include "spdlog/fmt/fmt.h"
|
#include "spdlog/fmt/fmt.h"
|
||||||
#include "spdlog/sinks/base_sink.h"
|
#include "spdlog/sinks/base_sink.h"
|
||||||
|
#include "spdlog/details/os.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/rotating_file_sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
|
|
||||||
#include "spdlog/details/file_helper.h"
|
#include "spdlog/details/file_helper.h"
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/details/pattern_formatter.h"
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "spdlog/logger.h"
|
#include "spdlog/logger.h"
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "spdlog/details/console_globals.h"
|
#include "spdlog/details/console_globals.h"
|
||||||
#include "spdlog/details/null_mutex.h"
|
#include "spdlog/details/null_mutex.h"
|
||||||
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -3,12 +3,19 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/sinks/wincolor_sink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "spdlog/common.h"
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace sinks {
|
namespace sinks {
|
||||||
|
|
||||||
template<typename TargetStream, typename ConsoleMutex>
|
template<typename TargetStream, typename ConsoleMutex>
|
||||||
SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::wincolor_sink()
|
SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::wincolor_sink()
|
||||||
: out_handle_(TargetStream::handle())
|
: out_handle_(TargetStream::handle())
|
||||||
, mutex_(ConsoleMutex::mutex())
|
, mutex_(ConsoleMutex::mutex())
|
||||||
{
|
{
|
||||||
colors_[level::trace] = WHITE;
|
colors_[level::trace] = WHITE;
|
||||||
colors_[level::debug] = CYAN;
|
colors_[level::debug] = CYAN;
|
||||||
@ -49,7 +56,7 @@ void SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::log(const details:
|
|||||||
print_range_(formatted, msg.color_range_start, msg.color_range_end);
|
print_range_(formatted, msg.color_range_start, msg.color_range_end);
|
||||||
::SetConsoleTextAttribute(out_handle_,
|
::SetConsoleTextAttribute(out_handle_,
|
||||||
orig_attribs); // reset to orig colors
|
orig_attribs); // reset to orig colors
|
||||||
// after color range
|
// after color range
|
||||||
print_range_(formatted, msg.color_range_end, formatted.size());
|
print_range_(formatted, msg.color_range_end, formatted.size());
|
||||||
}
|
}
|
||||||
else // print without colors if color range is invalid
|
else // print without colors if color range is invalid
|
||||||
@ -100,5 +107,5 @@ void SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::print_range_(const
|
|||||||
::WriteConsoleA(out_handle_, formatted.data() + start, size, nullptr, nullptr);
|
::WriteConsoleA(out_handle_, formatted.data() + start, size, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace sinks
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
@ -48,14 +48,13 @@ public:
|
|||||||
void set_pattern(const std::string &pattern) override final;
|
void set_pattern(const std::string &pattern) override final;
|
||||||
void set_formatter(std::unique_ptr<spdlog::formatter> sink_formatter) override final;
|
void set_formatter(std::unique_ptr<spdlog::formatter> sink_formatter) override final;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using mutex_t = typename ConsoleMutex::mutex_t;
|
using mutex_t = typename ConsoleMutex::mutex_t;
|
||||||
HANDLE out_handle_;
|
HANDLE out_handle_;
|
||||||
mutex_t &mutex_;
|
mutex_t &mutex_;
|
||||||
std::unordered_map<level::level_enum, WORD, level::level_hasher> colors_;
|
std::unordered_map<level::level_enum, WORD, level::level_hasher> colors_;
|
||||||
|
|
||||||
// set color and return the orig console attributes (for resetting later)
|
// set color and return the orig console attributes (for resetting later)
|
||||||
WORD set_console_attribs(WORD attribs);
|
WORD set_console_attribs(WORD attribs);
|
||||||
// print a range of formatted message to console
|
// print a range of formatted message to console
|
||||||
void print_range_(const fmt::memory_buffer &formatted, size_t start, size_t end);
|
void print_range_(const fmt::memory_buffer &formatted, size_t start, size_t end);
|
||||||
|
100
include/spdlog/spdlog-inl.h
Normal file
100
include/spdlog/spdlog-inl.h
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
|
||||||
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog/spdlog.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "spdlog/common.h"
|
||||||
|
#include "spdlog/details/pattern_formatter.h"
|
||||||
|
|
||||||
|
namespace spdlog {
|
||||||
|
|
||||||
|
SPDLOG_INLINE void initialize_logger(std::shared_ptr<logger> logger)
|
||||||
|
{
|
||||||
|
details::registry::instance().initialize_logger(std::move(logger));
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE std::shared_ptr<logger> get(const std::string &name)
|
||||||
|
{
|
||||||
|
return details::registry::instance().get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_formatter(std::unique_ptr<spdlog::formatter> formatter)
|
||||||
|
{
|
||||||
|
details::registry::instance().set_formatter(std::move(formatter));
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_pattern(std::string pattern, pattern_time_type time_type)
|
||||||
|
{
|
||||||
|
set_formatter(std::unique_ptr<spdlog::formatter>(new pattern_formatter(std::move(pattern), time_type)));
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_level(level::level_enum log_level)
|
||||||
|
{
|
||||||
|
details::registry::instance().set_level(log_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void flush_on(level::level_enum log_level)
|
||||||
|
{
|
||||||
|
details::registry::instance().flush_on(log_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void flush_every(std::chrono::seconds interval)
|
||||||
|
{
|
||||||
|
details::registry::instance().flush_every(interval);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_error_handler(void (*handler)(const std::string &msg))
|
||||||
|
{
|
||||||
|
details::registry::instance().set_error_handler(handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void register_logger(std::shared_ptr<logger> logger)
|
||||||
|
{
|
||||||
|
details::registry::instance().register_logger(std::move(logger));
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void apply_all(const std::function<void(std::shared_ptr<logger>)> &fun)
|
||||||
|
{
|
||||||
|
details::registry::instance().apply_all(fun);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void drop(const std::string &name)
|
||||||
|
{
|
||||||
|
details::registry::instance().drop(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void drop_all()
|
||||||
|
{
|
||||||
|
details::registry::instance().drop_all();
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void shutdown()
|
||||||
|
{
|
||||||
|
details::registry::instance().shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_automatic_registration(bool automatic_registation)
|
||||||
|
{
|
||||||
|
details::registry::instance().set_automatic_registration(automatic_registation);
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE std::shared_ptr<spdlog::logger> default_logger()
|
||||||
|
{
|
||||||
|
return details::registry::instance().default_logger();
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE spdlog::logger *default_logger_raw()
|
||||||
|
{
|
||||||
|
return details::registry::instance().get_default_raw();
|
||||||
|
}
|
||||||
|
|
||||||
|
SPDLOG_INLINE void set_default_logger(std::shared_ptr<spdlog::logger> default_logger)
|
||||||
|
{
|
||||||
|
details::registry::instance().set_default_logger(std::move(default_logger));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace spdlog
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/details/registry.h"
|
#include "spdlog/details/registry.h"
|
||||||
#include "spdlog/details/pattern_formatter.h"
|
|
||||||
#include "spdlog/logger.h"
|
#include "spdlog/logger.h"
|
||||||
#include "spdlog/version.h"
|
#include "spdlog/version.h"
|
||||||
|
|
||||||
@ -58,94 +57,52 @@ inline std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs
|
|||||||
// auto console_sink = std::make_shared<spdlog::sinks::stdout_sink_mt>();
|
// auto console_sink = std::make_shared<spdlog::sinks::stdout_sink_mt>();
|
||||||
// auto console_logger = std::make_shared<spdlog::logger>("console_logger", console_sink);
|
// auto console_logger = std::make_shared<spdlog::logger>("console_logger", console_sink);
|
||||||
// spdlog::initialize_logger(console_logger);
|
// spdlog::initialize_logger(console_logger);
|
||||||
inline void initialize_logger(std::shared_ptr<logger> logger)
|
void initialize_logger(std::shared_ptr<logger> logger);
|
||||||
{
|
|
||||||
details::registry::instance().initialize_logger(std::move(logger));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return an existing logger or nullptr if a logger with such name doesn't
|
// Return an existing logger or nullptr if a logger with such name doesn't
|
||||||
// exist.
|
// exist.
|
||||||
// example: spdlog::get("my_logger")->info("hello {}", "world");
|
// example: spdlog::get("my_logger")->info("hello {}", "world");
|
||||||
inline std::shared_ptr<logger> get(const std::string &name)
|
std::shared_ptr<logger> get(const std::string &name);
|
||||||
{
|
|
||||||
return details::registry::instance().get(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set global formatter. Each sink in each logger will get a clone of this object
|
// Set global formatter. Each sink in each logger will get a clone of this object
|
||||||
inline void set_formatter(std::unique_ptr<spdlog::formatter> formatter)
|
void set_formatter(std::unique_ptr<spdlog::formatter> formatter);
|
||||||
{
|
|
||||||
details::registry::instance().set_formatter(std::move(formatter));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set global format string.
|
// Set global format string.
|
||||||
// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v");
|
// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v");
|
||||||
inline void set_pattern(std::string pattern, pattern_time_type time_type = pattern_time_type::local)
|
void set_pattern(std::string pattern, pattern_time_type time_type = pattern_time_type::local);
|
||||||
{
|
|
||||||
set_formatter(std::unique_ptr<spdlog::formatter>(new pattern_formatter(std::move(pattern), time_type)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set global logging level
|
// Set global logging level
|
||||||
inline void set_level(level::level_enum log_level)
|
void set_level(level::level_enum log_level);
|
||||||
{
|
|
||||||
details::registry::instance().set_level(log_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set global flush level
|
// Set global flush level
|
||||||
inline void flush_on(level::level_enum log_level)
|
void flush_on(level::level_enum log_level);
|
||||||
{
|
|
||||||
details::registry::instance().flush_on(log_level);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start/Restart a periodic flusher thread
|
// Start/Restart a periodic flusher thread
|
||||||
// Warning: Use only if all your loggers are thread safe!
|
// Warning: Use only if all your loggers are thread safe!
|
||||||
inline void flush_every(std::chrono::seconds interval)
|
void flush_every(std::chrono::seconds interval);
|
||||||
{
|
|
||||||
details::registry::instance().flush_every(interval);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set global error handler
|
// Set global error handler
|
||||||
inline void set_error_handler(void (*handler)(const std::string &msg))
|
void set_error_handler(void (*handler)(const std::string &msg));
|
||||||
{
|
|
||||||
details::registry::instance().set_error_handler(handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Register the given logger with the given name
|
// Register the given logger with the given name
|
||||||
inline void register_logger(std::shared_ptr<logger> logger)
|
void register_logger(std::shared_ptr<logger> logger);
|
||||||
{
|
|
||||||
details::registry::instance().register_logger(std::move(logger));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply a user defined function on all registered loggers
|
// Apply a user defined function on all registered loggers
|
||||||
// Example:
|
// Example:
|
||||||
// spdlog::apply_all([&](std::shared_ptr<spdlog::logger> l) {l->flush();});
|
// spdlog::apply_all([&](std::shared_ptr<spdlog::logger> l) {l->flush();});
|
||||||
inline void apply_all(const std::function<void(std::shared_ptr<logger>)> &fun)
|
void apply_all(const std::function<void(std::shared_ptr<logger>)> &fun);
|
||||||
{
|
|
||||||
details::registry::instance().apply_all(fun);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drop the reference to the given logger
|
// Drop the reference to the given logger
|
||||||
inline void drop(const std::string &name)
|
void drop(const std::string &name);
|
||||||
{
|
|
||||||
details::registry::instance().drop(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Drop all references from the registry
|
// Drop all references from the registry
|
||||||
inline void drop_all()
|
void drop_all();
|
||||||
{
|
|
||||||
details::registry::instance().drop_all();
|
|
||||||
}
|
|
||||||
|
|
||||||
// stop any running threads started by spdlog and clean registry loggers
|
// stop any running threads started by spdlog and clean registry loggers
|
||||||
inline void shutdown()
|
void shutdown();
|
||||||
{
|
|
||||||
details::registry::instance().shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Automatic registration of loggers when using spdlog::create() or spdlog::create_async
|
// Automatic registration of loggers when using spdlog::create() or spdlog::create_async
|
||||||
inline void set_automatic_registration(bool automatic_registation)
|
void set_automatic_registration(bool automatic_registation);
|
||||||
{
|
|
||||||
details::registry::instance().set_automatic_registration(automatic_registation);
|
|
||||||
}
|
|
||||||
|
|
||||||
// API for using default logger (stdout_color_mt),
|
// API for using default logger (stdout_color_mt),
|
||||||
// e.g: spdlog::info("Message {}", 1);
|
// e.g: spdlog::info("Message {}", 1);
|
||||||
@ -162,20 +119,11 @@ inline void set_automatic_registration(bool automatic_registation)
|
|||||||
// set_default_logger() *should not* be used concurrently with the default API.
|
// set_default_logger() *should not* be used concurrently with the default API.
|
||||||
// e.g do not call set_default_logger() from one thread while calling spdlog::info() from another.
|
// e.g do not call set_default_logger() from one thread while calling spdlog::info() from another.
|
||||||
|
|
||||||
inline std::shared_ptr<spdlog::logger> default_logger()
|
std::shared_ptr<spdlog::logger> default_logger();
|
||||||
{
|
|
||||||
return details::registry::instance().default_logger();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline spdlog::logger *default_logger_raw()
|
spdlog::logger *default_logger_raw();
|
||||||
{
|
|
||||||
return details::registry::instance().get_default_raw();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void set_default_logger(std::shared_ptr<spdlog::logger> default_logger)
|
void set_default_logger(std::shared_ptr<spdlog::logger> default_logger);
|
||||||
{
|
|
||||||
details::registry::instance().set_default_logger(std::move(default_logger));
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
inline void log(source_loc source, level::level_enum lvl, const char *fmt, const Args &... args)
|
inline void log(source_loc source, level::level_enum lvl, const char *fmt, const Args &... args)
|
||||||
@ -382,4 +330,8 @@ inline void critical(const wchar_t *fmt, const Args &... args)
|
|||||||
#define SPDLOG_CRITICAL(...) (void)0
|
#define SPDLOG_CRITICAL(...) (void)0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SPDLOG_HEADER_ONLY
|
||||||
|
#include "spdlog-inl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // SPDLOG_H
|
#endif // SPDLOG_H
|
||||||
|
@ -8,65 +8,48 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/details/null_mutex.h"
|
||||||
#include "spdlog/async.h"
|
#include "spdlog/async.h"
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/spdlog-inl.h"
|
||||||
#include "spdlog/common-inl.h"
|
#include "spdlog/common-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/null_mutex.h"
|
|
||||||
|
|
||||||
#include "spdlog/logger.h"
|
|
||||||
#include "spdlog/logger-inl.h"
|
#include "spdlog/logger-inl.h"
|
||||||
template spdlog::logger::logger(std::string name, sinks_init_list::iterator begin, sinks_init_list::iterator end);
|
template spdlog::logger::logger(std::string name, sinks_init_list::iterator begin, sinks_init_list::iterator end);
|
||||||
|
|
||||||
#include "spdlog/async_logger.h"
|
|
||||||
#include "spdlog/async_logger-inl.h"
|
#include "spdlog/async_logger-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/log_msg.h"
|
|
||||||
#include "spdlog/details/log_msg-inl.h"
|
#include "spdlog/details/log_msg-inl.h"
|
||||||
|
|
||||||
#include "spdlog/sinks/sink.h"
|
|
||||||
#include "spdlog/sinks/sink-inl.h"
|
#include "spdlog/sinks/sink-inl.h"
|
||||||
|
|
||||||
#include "spdlog/sinks/base_sink.h"
|
|
||||||
#include "spdlog/sinks/base_sink-inl.h"
|
#include "spdlog/sinks/base_sink-inl.h"
|
||||||
template class spdlog::sinks::base_sink<std::mutex>;
|
template class spdlog::sinks::base_sink<std::mutex>;
|
||||||
template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
|
template class spdlog::sinks::base_sink<spdlog::details::null_mutex>;
|
||||||
|
|
||||||
#include "spdlog/sinks/rotating_file_sink.h"
|
#include "spdlog/sinks/basic_file_sink-inl.h"
|
||||||
|
template class spdlog::sinks::basic_file_sink<std::mutex>;
|
||||||
|
template class spdlog::sinks::basic_file_sink<spdlog::details::null_mutex>;
|
||||||
|
|
||||||
#include "spdlog/sinks/rotating_file_sink-inl.h"
|
#include "spdlog/sinks/rotating_file_sink-inl.h"
|
||||||
template class spdlog::sinks::rotating_file_sink<std::mutex>;
|
template class spdlog::sinks::rotating_file_sink<std::mutex>;
|
||||||
template class spdlog::sinks::rotating_file_sink<spdlog::details::null_mutex>;
|
template class spdlog::sinks::rotating_file_sink<spdlog::details::null_mutex>;
|
||||||
|
|
||||||
#include "spdlog/details/registry.h"
|
|
||||||
#include "spdlog/details/registry-inl.h"
|
#include "spdlog/details/registry-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/os.h"
|
|
||||||
#include "spdlog/details/os-inl.h"
|
#include "spdlog/details/os-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/periodic_worker.h"
|
|
||||||
#include "spdlog/details/periodic_worker-inl.h"
|
#include "spdlog/details/periodic_worker-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/file_helper.h"
|
|
||||||
#include "spdlog/details/file_helper-inl.h"
|
#include "spdlog/details/file_helper-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/pattern_formatter.h"
|
|
||||||
#include "spdlog/details/pattern_formatter-inl.h"
|
#include "spdlog/details/pattern_formatter-inl.h"
|
||||||
|
|
||||||
#include "spdlog/details/thread_pool.h"
|
|
||||||
#include "spdlog/details/thread_pool-inl.h"
|
#include "spdlog/details/thread_pool-inl.h"
|
||||||
template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>;
|
template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "spdlog/sinks/wincolor_sink.h"
|
|
||||||
#include "spdlog/sinks/wincolor_sink-inl.h"
|
#include "spdlog/sinks/wincolor_sink-inl.h"
|
||||||
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>;
|
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>;
|
||||||
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>;
|
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>;
|
||||||
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stderr, spdlog::details::console_mutex>;
|
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stderr, spdlog::details::console_mutex>;
|
||||||
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stderr, spdlog::details::console_nullmutex>;
|
template class spdlog::sinks::wincolor_sink<spdlog::details::console_stderr, spdlog::details::console_nullmutex>;
|
||||||
#else
|
#else
|
||||||
#include "spdlog/sinks/ansicolor_sink.h"
|
|
||||||
#include "spdlog/sinks/ansicolor_sink-inl.h"
|
#include "spdlog/sinks/ansicolor_sink-inl.h"
|
||||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>;
|
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_mutex>;
|
||||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>;
|
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stdout, spdlog::details::console_nullmutex>;
|
||||||
@ -74,7 +57,6 @@ template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, sp
|
|||||||
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, spdlog::details::console_nullmutex>;
|
template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, spdlog::details::console_nullmutex>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
|
||||||
#include "spdlog/sinks/stdout_color_sinks-inl.h"
|
#include "spdlog/sinks/stdout_color_sinks-inl.h"
|
||||||
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::synchronous_factory>(const std::string &logger_name);
|
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_mt<spdlog::synchronous_factory>(const std::string &logger_name);
|
||||||
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::synchronous_factory>(const std::string &logger_name);
|
template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::synchronous_factory>(const std::string &logger_name);
|
||||||
@ -86,11 +68,6 @@ template std::shared_ptr<spdlog::logger> spdlog::stdout_color_st<spdlog::async_f
|
|||||||
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_mt<spdlog::async_factory>(const std::string &logger_name);
|
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_mt<spdlog::async_factory>(const std::string &logger_name);
|
||||||
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_st<spdlog::async_factory>(const std::string &logger_name);
|
template std::shared_ptr<spdlog::logger> spdlog::stderr_color_st<spdlog::async_factory>(const std::string &logger_name);
|
||||||
|
|
||||||
// fmt_helper templates
|
|
||||||
#include "spdlog/details/fmt_helper.h"
|
|
||||||
template void spdlog::details::fmt_helper::append_string_view(spdlog::string_view_t view, fmt::memory_buffer &dest);
|
|
||||||
template spdlog::string_view_t spdlog::details::fmt_helper::to_string_view(const fmt::memory_buffer &buf) SPDLOG_NOEXCEPT;
|
|
||||||
|
|
||||||
// Slightly modified version of fmt lib's format.cc source file.
|
// Slightly modified version of fmt lib's format.cc source file.
|
||||||
// Copyright (c) 2012 - 2016, Victor Zverovich
|
// Copyright (c) 2012 - 2016, Victor Zverovich
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
|
@ -21,7 +21,7 @@ set(SPDLOG_UTESTS_SOURCES
|
|||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${SPDLOG_UTESTS_SOURCES})
|
add_executable(${PROJECT_NAME} ${SPDLOG_UTESTS_SOURCES})
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
|
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::static)
|
||||||
|
|
||||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
CXX ?= g++
|
|
||||||
CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -Wconversion -O3 -I../include -fmax-errors=1
|
|
||||||
LDPFALGS = -pthread -lsystemd
|
|
||||||
|
|
||||||
CPP_FILES := $(wildcard *.cpp)
|
|
||||||
OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o)))
|
|
||||||
|
|
||||||
|
|
||||||
tests: $(OBJ_FILES)
|
|
||||||
$(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^
|
|
||||||
mkdir -p logs
|
|
||||||
|
|
||||||
%.o: %.cpp
|
|
||||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f tests *.o logs/*.txt
|
|
||||||
|
|
||||||
rebuild: clean tests
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -20,3 +20,4 @@
|
|||||||
#include "spdlog/sinks/ostream_sink.h"
|
#include "spdlog/sinks/ostream_sink.h"
|
||||||
#include "spdlog/sinks/rotating_file_sink.h"
|
#include "spdlog/sinks/rotating_file_sink.h"
|
||||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||||
|
#include "spdlog/details/pattern_formatter.h"
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
#include "spdlog/details/fmt_helper.h"
|
||||||
|
|
||||||
void test_pad2(int n, const char *expected)
|
void test_pad2(int n, const char *expected)
|
||||||
{
|
{
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 15
|
|
||||||
VisualStudioVersion = 15.0.27428.2037
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests.vcxproj", "{59A07559-5F38-4DD6-A7FA-DB4153690B42}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "spdlog", "spdlog", "{0C043010-E40A-43B9-A5EA-B931FC8B6EFB}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\async.h = ..\include\spdlog\async.h
|
|
||||||
..\include\spdlog\async_logger.h = ..\include\spdlog\async_logger.h
|
|
||||||
..\include\spdlog\common.h = ..\include\spdlog\common.h
|
|
||||||
..\include\spdlog\formatter.h = ..\include\spdlog\formatter.h
|
|
||||||
..\include\spdlog\logger.h = ..\include\spdlog\logger.h
|
|
||||||
..\include\spdlog\spdlog.h = ..\include\spdlog\spdlog.h
|
|
||||||
..\include\spdlog\tweakme.h = ..\include\spdlog\tweakme.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "details", "details", "{C8A207B7-6930-4D28-85BB-EA79ADFD7DAC}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\details\async_logger_impl.h = ..\include\spdlog\details\async_logger_impl.h
|
|
||||||
..\include\spdlog\details\file_helper.h = ..\include\spdlog\details\file_helper.h
|
|
||||||
..\include\spdlog\details\log_msg.h = ..\include\spdlog\details\log_msg.h
|
|
||||||
..\include\spdlog\details\logger_impl.h = ..\include\spdlog\details\logger_impl.h
|
|
||||||
..\include\spdlog\details\mpmc_bounded_q.h = ..\include\spdlog\details\mpmc_bounded_q.h
|
|
||||||
..\include\spdlog\details\null_mutex.h = ..\include\spdlog\details\null_mutex.h
|
|
||||||
..\include\spdlog\details\os.h = ..\include\spdlog\details\os.h
|
|
||||||
..\include\spdlog\details\pattern_formatter.h = ..\include\spdlog\details\pattern_formatter.h
|
|
||||||
..\include\spdlog\details\registry.h = ..\include\spdlog\details\registry.h
|
|
||||||
..\include\spdlog\details\spdlog_impl.h = ..\include\spdlog\details\spdlog_impl.h
|
|
||||||
..\include\spdlog\details\thread_pool.h = ..\include\spdlog\details\thread_pool.h
|
|
||||||
..\include\spdlog\details\traits.h = ..\include\spdlog\details\traits.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fmt", "fmt", "{6512BA57-E9B9-4971-BC3A-83C784CC59A5}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\fmt\fmt.h = ..\include\spdlog\fmt\fmt.h
|
|
||||||
..\include\spdlog\fmt\ostr.h = ..\include\spdlog\fmt\ostr.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bundled", "bundled", "{F0D4A944-E0C7-4575-8254-06AC92B384E6}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\fmt\bundled\format.cc = ..\include\spdlog\fmt\bundled\format.cc
|
|
||||||
..\include\spdlog\fmt\bundled\format.h = ..\include\spdlog\fmt\bundled\format.h
|
|
||||||
..\include\spdlog\fmt\bundled\LICENSE.rst = ..\include\spdlog\fmt\bundled\LICENSE.rst
|
|
||||||
..\include\spdlog\fmt\bundled\ostream.cc = ..\include\spdlog\fmt\bundled\ostream.cc
|
|
||||||
..\include\spdlog\fmt\bundled\ostream.h = ..\include\spdlog\fmt\bundled\ostream.h
|
|
||||||
..\include\spdlog\fmt\bundled\posix.cc = ..\include\spdlog\fmt\bundled\posix.cc
|
|
||||||
..\include\spdlog\fmt\bundled\posix.h = ..\include\spdlog\fmt\bundled\posix.h
|
|
||||||
..\include\spdlog\fmt\bundled\time.h = ..\include\spdlog\fmt\bundled\time.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sinks", "sinks", "{093AE34A-B617-467E-8F31-3C5A85EF51EB}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
..\include\spdlog\sinks\android_sink.h = ..\include\spdlog\sinks\android_sink.h
|
|
||||||
..\include\spdlog\sinks\ansicolor_sink.h = ..\include\spdlog\sinks\ansicolor_sink.h
|
|
||||||
..\include\spdlog\sinks\base_sink.h = ..\include\spdlog\sinks\base_sink.h
|
|
||||||
..\include\spdlog\sinks\dist_sink.h = ..\include\spdlog\sinks\dist_sink.h
|
|
||||||
..\include\spdlog\sinks\msvc_sink.h = ..\include\spdlog\sinks\msvc_sink.h
|
|
||||||
..\include\spdlog\sinks\null_sink.h = ..\include\spdlog\sinks\null_sink.h
|
|
||||||
..\include\spdlog\sinks\ostream_sink.h = ..\include\spdlog\sinks\ostream_sink.h
|
|
||||||
..\include\spdlog\sinks\sink.h = ..\include\spdlog\sinks\sink.h
|
|
||||||
..\include\spdlog\sinks\stdout_color_sinks.h = ..\include\spdlog\sinks\stdout_color_sinks.h
|
|
||||||
..\include\spdlog\sinks\stdout_sinks.h = ..\include\spdlog\sinks\stdout_sinks.h
|
|
||||||
..\include\spdlog\sinks\syslog_sink.h = ..\include\spdlog\sinks\syslog_sink.h
|
|
||||||
..\include\spdlog\sinks\wincolor_sink.h = ..\include\spdlog\sinks\wincolor_sink.h
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Win32 = Debug|Win32
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|Win32 = Release|Win32
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Debug|Win32.Build.0 = Debug|Win32
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Release|Win32.ActiveCfg = Release|Win32
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Release|Win32.Build.0 = Release|Win32
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{59A07559-5F38-4DD6-A7FA-DB4153690B42}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{C8A207B7-6930-4D28-85BB-EA79ADFD7DAC} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB}
|
|
||||||
{6512BA57-E9B9-4971-BC3A-83C784CC59A5} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB}
|
|
||||||
{F0D4A944-E0C7-4575-8254-06AC92B384E6} = {6512BA57-E9B9-4971-BC3A-83C784CC59A5}
|
|
||||||
{093AE34A-B617-467E-8F31-3C5A85EF51EB} = {0C043010-E40A-43B9-A5EA-B931FC8B6EFB}
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {1D363F0E-2DC2-4544-963A-9812679AFF6B}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,148 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{59A07559-5F38-4DD6-A7FA-DB4153690B42}</ProjectGuid>
|
|
||||||
<RootNamespace>tests</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v141</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="errors.cpp" />
|
|
||||||
<ClCompile Include="file_helper.cpp" />
|
|
||||||
<ClCompile Include="file_log.cpp" />
|
|
||||||
<ClCompile Include="test_async.cpp" />
|
|
||||||
<ClCompile Include="test_misc.cpp" />
|
|
||||||
<ClCompile Include="main.cpp" />
|
|
||||||
<ClCompile Include="registry.cpp" />
|
|
||||||
<ClCompile Include="test_macros.cpp" />
|
|
||||||
<ClCompile Include="test_pattern_formatter.cpp" />
|
|
||||||
<ClCompile Include="utils.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="catch.hpp" />
|
|
||||||
<ClInclude Include="includes.h" />
|
|
||||||
<ClInclude Include="utils.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,60 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="file_log.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="main.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="registry.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="file_helper.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="utils.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="errors.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="test_macros.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="test_pattern_formatter.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="test_misc.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="test_async.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="includes.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="catch.hpp">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="utils.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup />
|
|
||||||
</Project>
|
|
Loading…
Reference in New Issue
Block a user