Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
9f34c58b
Commit
9f34c58b
authored
Jan 15, 2015
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments
parent
f3a41748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
include/spdlog/common.h
include/spdlog/common.h
+1
-1
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+7
-1
No files found.
include/spdlog/common.h
View file @
9f34c58b
...
@@ -77,7 +77,7 @@ inline const char* to_str(spdlog::level::level_enum l)
...
@@ -77,7 +77,7 @@ inline const char* to_str(spdlog::level::level_enum l)
//
//
// Async
mode - off
by default.
// Async
overflow policy - block
by default.
//
//
enum
class
async_overflow_policy
enum
class
async_overflow_policy
{
{
...
...
include/spdlog/spdlog.h
View file @
9f34c58b
...
@@ -57,8 +57,14 @@ void set_formatter(formatter_ptr f);
...
@@ -57,8 +57,14 @@ void set_formatter(formatter_ptr f);
void
set_level
(
level
::
level_enum
log_level
);
void
set_level
(
level
::
level_enum
log_level
);
// Turn on async mode and set the queue size for each async_logger
// Turn on async mode and set the queue size for each async_logger.
// queue_size: size of queue (must be power of 2). The queue will pre allocate queue_size entries upon construction.
// async_overflow_policy (optional):
// async_overflow_policy::block_retry (default policy, if queue is full, block until queue has room for the new log entry)
// async_overflow_policy::discard_log_msg (never block and discard any new messages when queue overflows)
// worker_warmup_cb(optional): callback function that will be called in worker thread upon start (can be used to init stuff like thread affinity)
void
set_async_mode
(
size_t
queue_size
,
const
async_overflow_policy
overflow_policy
=
async_overflow_policy
::
block_retry
,
const
std
::
function
<
void
()
>&
worker_warmup_cb
=
nullptr
);
void
set_async_mode
(
size_t
queue_size
,
const
async_overflow_policy
overflow_policy
=
async_overflow_policy
::
block_retry
,
const
std
::
function
<
void
()
>&
worker_warmup_cb
=
nullptr
);
// Turn off async mode
// Turn off async mode
void
set_sync_mode
();
void
set_sync_mode
();
...
...
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