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
005450ff
Commit
005450ff
authored
May 11, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
f8094275
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
12 deletions
+7
-12
CMakeLists.txt
CMakeLists.txt
+2
-1
async_logger.h
include/spdlog/async_logger.h
+2
-5
logger.h
include/spdlog/logger.h
+1
-1
spdlog.cpp
src/spdlog.cpp
+2
-5
No files found.
CMakeLists.txt
View file @
005450ff
...
...
@@ -59,7 +59,8 @@ message(STATUS "Static lib: " ${SPDLOG_STATIC_LIB})
if
(
SPDLOG_STATIC_LIB
)
add_definitions
(
-DSPDLOG_STATIC_LIB
)
file
(
GLOB SRC_FILES
${
HEADER_BASE
}
/impl/*.cpp
)
set
(
SRC_BASE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
)
set
(
SRC_FILES
"
${
SRC_BASE
}
/spdlog.cpp"
"
${
SRC_BASE
}
/format.cc"
)
add_library
(
spdlog STATIC
${
SRC_FILES
}
)
target_include_directories
(
spdlog PUBLIC
"$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>"
)
target_link_libraries
(
spdlog -Wl,--as-needed
)
...
...
include/spdlog/async_logger.h
View file @
005450ff
...
...
@@ -5,17 +5,14 @@
#pragma once
// Very fast asynchronous logger (millions of logs per second on an average
// desktop)
// Uses pre allocated lockfree queue for maximum throughput even under large
// number of threads.
// Fast asynchronous logger.
// Uses pre allocated queue.
// Creates a single back thread to pop messages from the queue and log them.
//
// Upon each log write the logger:
// 1. Checks if its log level is enough to log the message
// 2. Push a new copy of the message to a queue (or block the caller until
// space is available in the queue)
// 3. will throw spdlog_ex upon log exceptions
// Upon destruction, logs all remaining messages in the queue before
// destructing..
...
...
include/spdlog/logger.h
View file @
005450ff
...
...
@@ -341,5 +341,5 @@ protected:
}
// namespace spdlog
#ifndef SPDLOG_STATIC_LIB
#include "logger-inl.h
#include "logger-inl.h
"
#endif
src/spdlog.cpp
View file @
005450ff
#include <mutex>
#include "spdlog/spdlog.h"
#include "spdlog/details/null_mutex.h"
#include "spdlog/logger.h"
...
...
@@ -7,9 +8,6 @@
#include "spdlog/async_logger.h"
#include "spdlog/async_logger-inl.h"
#include "spdlog/async_logger.h"
#include "spdlog/async_logger-inl.h"
#include "spdlog/details/log_msg.h"
#include "spdlog/details/log_msg-inl.h"
...
...
@@ -42,7 +40,6 @@ template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>;
#include "spdlog/sinks/ansicolor_sink.h"
#include "spdlog/sinks/ansicolor_sink-inl.h"
// template instantiate stdout_mt, stdout_st, stderr_mt, stderr_st
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_stderr
,
spdlog
::
details
::
console_mutex
>
;
...
...
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