Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
cce1e36e
Commit
cce1e36e
authored
Jan 24, 2019
by
Philip Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/v1.x' into pwm1234/rotate_on_open
parents
4fe98bf6
3466c9c8
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
38 additions
and
25 deletions
+38
-25
CMakeLists.txt
CMakeLists.txt
+2
-3
README.md
README.md
+1
-1
CMakeLists.txt
bench/CMakeLists.txt
+5
-6
log_msg.h
include/spdlog/details/log_msg.h
+1
-1
android_sink.h
include/spdlog/sinks/android_sink.h
+1
-1
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+1
-1
basic_file_sink.h
include/spdlog/sinks/basic_file_sink.h
+6
-1
daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+6
-1
dist_sink.h
include/spdlog/sinks/dist_sink.h
+1
-1
msvc_sink.h
include/spdlog/sinks/msvc_sink.h
+1
-1
null_sink.h
include/spdlog/sinks/null_sink.h
+1
-1
ostream_sink.h
include/spdlog/sinks/ostream_sink.h
+1
-1
rotating_file_sink.h
include/spdlog/sinks/rotating_file_sink.h
+6
-1
stdout_color_sinks.h
include/spdlog/sinks/stdout_color_sinks.h
+1
-1
stdout_sinks.h
include/spdlog/sinks/stdout_sinks.h
+1
-1
syslog_sink.h
include/spdlog/sinks/syslog_sink.h
+1
-1
wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+1
-1
version.h
include/spdlog/version.h
+1
-1
No files found.
CMakeLists.txt
View file @
cce1e36e
...
...
@@ -4,7 +4,7 @@
#
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
(
GNUInstallDirs
)
...
...
@@ -30,7 +30,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
add_compile_options
(
"-Wconversion"
)
add_compile_options
(
"-pedantic"
)
add_compile_options
(
"-Wfatal-errors"
)
endif
()
#---------------------------------------------------------------------------------------
...
...
@@ -51,7 +50,7 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
endif
()
option
(
SPDLOG_BUILD_EXAMPLES
"Build examples"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_BUILD_BENCH
"Build benchmarks
"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_BUILD_BENCH
"Build benchmarks
(Requires https://github.com/google/benchmark.git to be installed)"
OFF
)
option
(
SPDLOG_BUILD_TESTS
"Build tests"
${
SPDLOG_MASTER_PROJECT
}
)
option
(
SPDLOG_FMT_EXTERNAL
"Use external fmt library instead of bundled"
OFF
)
...
...
README.md
View file @
cce1e36e
...
...
@@ -91,7 +91,7 @@ int main()
spdlog
::
info
(
"Positional args are {1} {0}.."
,
"too"
,
"supported"
);
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.."
);
// change log pattern
...
...
bench/CMakeLists.txt
View file @
cce1e36e
...
...
@@ -30,20 +30,19 @@ if(NOT TARGET spdlog)
endif
()
find_package
(
Threads REQUIRED
)
find_package
(
benchmark CONFIG REQUIRED
)
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
)
target_link_libraries
(
async_bench spdlog::spdlog Threads::Threads
)
target_link_libraries
(
async_bench
PRIVATE
spdlog::spdlog Threads::Threads
)
add_executable
(
latency latency.cpp
)
set
(
CMAKE_CXX_STANDARD_LIBRARIES -lbenchmark
)
target_link_libraries
(
latency spdlog::spdlog Threads::Threads
)
target_link_libraries
(
latency PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads
)
add_executable
(
formatter-bench formatter-bench.cpp
)
set
(
CMAKE_CXX_STANDARD_LIBRARIES -lbenchmark
)
target_link_libraries
(
formatter-bench spdlog::spdlog Threads::Threads
)
target_link_libraries
(
formatter-bench PRIVATE benchmark::benchmark spdlog::spdlog Threads::Threads
)
file
(
MAKE_DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/logs"
)
include/spdlog/details/log_msg.h
View file @
cce1e36e
...
...
@@ -25,9 +25,9 @@ struct log_msg
#ifndef SPDLOG_NO_THREAD_ID
,
thread_id
(
os
::
thread_id
())
#endif
,
source
(
loc
)
,
payload
(
view
)
#endif
{
}
...
...
include/spdlog/sinks/android_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/fmt_helper.h"
...
...
include/spdlog/sinks/ansicolor_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/console_globals.h"
...
...
include/spdlog/sinks/basic_file_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/file_helper.h"
...
...
@@ -30,6 +30,11 @@ public:
file_helper_
.
open
(
filename
,
truncate
);
}
const
filename_t
&
filename
()
const
{
return
file_helper_
.
filename
();
}
protected
:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
{
...
...
include/spdlog/sinks/daily_file_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/file_helper.h"
...
...
@@ -63,6 +63,11 @@ public:
rotation_tp_
=
next_rotation_tp_
();
}
const
filename_t
&
filename
()
const
{
return
file_helper_
.
filename
();
}
protected
:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
{
...
...
include/spdlog/sinks/dist_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "base_sink.h"
...
...
include/spdlog/sinks/msvc_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#if defined(_WIN32)
...
...
include/spdlog/sinks/null_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/null_mutex.h"
...
...
include/spdlog/sinks/ostream_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/null_mutex.h"
...
...
include/spdlog/sinks/rotating_file_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/file_helper.h"
...
...
@@ -60,6 +60,11 @@ public:
return
fmt
::
to_string
(
w
);
}
const
filename_t
&
filename
()
const
{
return
file_helper_
.
filename
();
}
protected
:
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
{
...
...
include/spdlog/sinks/stdout_color_sinks.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#ifdef _WIN32
...
...
include/spdlog/sinks/stdout_sinks.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/details/console_globals.h"
...
...
include/spdlog/sinks/syslog_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/sinks/base_sink.h"
...
...
include/spdlog/sinks/wincolor_sink.h
View file @
cce1e36e
...
...
@@ -6,7 +6,7 @@
#pragma once
#ifndef SPDLOG_H
#
error "spdlog.h must be included before this file.
"
#
include "spdlog/spdlog.h
"
#endif
#include "spdlog/common.h"
...
...
include/spdlog/version.h
View file @
cce1e36e
...
...
@@ -7,6 +7,6 @@
#define SPDLOG_VER_MAJOR 1
#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)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment