Compare commits

...

7 Commits

Author SHA1 Message Date
gabime
a7148b718e Version 1.3.1 2019-01-18 12:13:07 +02:00
gabime
23fdc0eae4 Fixed issue #959 2019-01-17 17:09:35 +02:00
Gabi Melman
8cb1bc89f1 Merge pull request #969 from scribam/patch-1
Update log_msg.h
2019-01-17 03:18:36 +02:00
scribam
1798a1fa12 Update log_msg.h
`SPDLOG_NO_THREAD_ID` should only affect thread retrieval.
2019-01-17 00:23:06 +01:00
Gabi Melman
f4c737ef42 Merge pull request #962 from myd7349/bench-patch
Fix #961 benchmark link error
2019-01-14 15:53:28 +02:00
myd7349
611df4964d Fix #961 benchmark link error 2019-01-14 20:18:35 +08:00
Gabi Melman
0a4ccf22da Update README.md 2019-01-14 11:39:35 +02:00
18 changed files with 22 additions and 23 deletions

View File

@@ -4,7 +4,7 @@
# #
cmake_minimum_required(VERSION 3.1) cmake_minimum_required(VERSION 3.1)
project(spdlog VERSION 1.3.0 LANGUAGES CXX) project(spdlog VERSION 1.3.1 LANGUAGES CXX)
include(CMakeDependentOption) include(CMakeDependentOption)
include(GNUInstallDirs) include(GNUInstallDirs)

View File

@@ -91,7 +91,7 @@ int main()
spdlog::info("Positional args are {1} {0}..", "too", "supported"); spdlog::info("Positional args are {1} {0}..", "too", "supported");
spdlog::info("{:<30}", "left aligned"); spdlog::info("{:<30}", "left aligned");
spdlog::set_level(spdlog::level::debug/ Set global log level to debug spdlog::set_level(spdlog::level::debug); // Set global log level to debug
spdlog::debug("This message should be displayed.."); spdlog::debug("This message should be displayed..");
// change log pattern // change log pattern

View File

@@ -30,20 +30,19 @@ if(NOT TARGET spdlog)
endif() endif()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
find_package(benchmark CONFIG REQUIRED)
add_executable(bench bench.cpp) add_executable(bench bench.cpp)
target_link_libraries(bench spdlog::spdlog Threads::Threads) target_link_libraries(bench PRIVATE spdlog::spdlog Threads::Threads)
add_executable(async_bench async_bench.cpp) add_executable(async_bench async_bench.cpp)
target_link_libraries(async_bench spdlog::spdlog Threads::Threads) target_link_libraries(async_bench PRIVATE spdlog::spdlog Threads::Threads)
add_executable(latency latency.cpp) add_executable(latency latency.cpp)
set(CMAKE_CXX_STANDARD_LIBRARIES -lbenchmark) target_link_libraries(latency PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads)
target_link_libraries(latency spdlog::spdlog Threads::Threads)
add_executable(formatter-bench formatter-bench.cpp) add_executable(formatter-bench formatter-bench.cpp)
set(CMAKE_CXX_STANDARD_LIBRARIES -lbenchmark) target_link_libraries(formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads)
target_link_libraries(formatter-bench spdlog::spdlog Threads::Threads)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs") file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/logs")

View File

@@ -25,9 +25,9 @@ struct log_msg
#ifndef SPDLOG_NO_THREAD_ID #ifndef SPDLOG_NO_THREAD_ID
, thread_id(os::thread_id()) , thread_id(os::thread_id())
#endif
, source(loc) , source(loc)
, payload(view) , payload(view)
#endif
{ {
} }

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/fmt_helper.h" #include "spdlog/details/fmt_helper.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/console_globals.h" #include "spdlog/details/console_globals.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/file_helper.h" #include "spdlog/details/file_helper.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/file_helper.h" #include "spdlog/details/file_helper.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "base_sink.h" #include "base_sink.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#if defined(_WIN32) #if defined(_WIN32)

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/null_mutex.h" #include "spdlog/details/null_mutex.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/null_mutex.h" #include "spdlog/details/null_mutex.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/file_helper.h" #include "spdlog/details/file_helper.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#ifdef _WIN32 #ifdef _WIN32

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/details/console_globals.h" #include "spdlog/details/console_globals.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/sinks/base_sink.h" #include "spdlog/sinks/base_sink.h"

View File

@@ -6,7 +6,7 @@
#pragma once #pragma once
#ifndef SPDLOG_H #ifndef SPDLOG_H
#error "spdlog.h must be included before this file." #include "spdlog/spdlog.h"
#endif #endif
#include "spdlog/common.h" #include "spdlog/common.h"

View File

@@ -7,6 +7,6 @@
#define SPDLOG_VER_MAJOR 1 #define SPDLOG_VER_MAJOR 1
#define SPDLOG_VER_MINOR 3 #define SPDLOG_VER_MINOR 3
#define SPDLOG_VER_PATCH 0 #define SPDLOG_VER_PATCH 1
#define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH)