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
0284a23d
Commit
0284a23d
authored
Aug 22, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed sink_it_ to accept const log_message&
parent
7e728869
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
8 deletions
+7
-8
async_logger-inl.h
include/spdlog/async_logger-inl.h
+1
-1
async_logger.h
include/spdlog/async_logger.h
+1
-2
thread_pool-inl.h
include/spdlog/details/thread_pool-inl.h
+1
-1
thread_pool.h
include/spdlog/details/thread_pool.h
+2
-2
logger-inl.h
include/spdlog/logger-inl.h
+1
-1
logger.h
include/spdlog/logger.h
+1
-1
No files found.
include/spdlog/async_logger-inl.h
View file @
0284a23d
...
...
@@ -25,7 +25,7 @@ SPDLOG_INLINE spdlog::async_logger::async_logger(
{}
// send the log message to the thread pool
SPDLOG_INLINE
void
spdlog
::
async_logger
::
sink_it_
(
details
::
log_msg
&
msg
)
SPDLOG_INLINE
void
spdlog
::
async_logger
::
sink_it_
(
const
details
::
log_msg
&
msg
)
{
if
(
auto
pool_ptr
=
thread_pool_
.
lock
())
{
...
...
include/spdlog/async_logger.h
View file @
0284a23d
...
...
@@ -52,9 +52,8 @@ public:
std
::
shared_ptr
<
logger
>
clone
(
std
::
string
new_name
)
override
;
protected
:
void
sink_it_
(
details
::
log_msg
&
msg
)
override
;
void
sink_it_
(
const
details
::
log_msg
&
msg
)
override
;
void
flush_
()
override
;
void
backend_log_
(
const
details
::
log_msg
&
incoming_log_msg
);
void
backend_flush_
();
...
...
include/spdlog/details/thread_pool-inl.h
View file @
0284a23d
...
...
@@ -51,7 +51,7 @@ SPDLOG_INLINE thread_pool::~thread_pool()
SPDLOG_CATCH_ALL
()
{}
}
void
SPDLOG_INLINE
thread_pool
::
post_log
(
async_logger_ptr
&&
worker_ptr
,
details
::
log_msg
&
msg
,
async_overflow_policy
overflow_policy
)
void
SPDLOG_INLINE
thread_pool
::
post_log
(
async_logger_ptr
&&
worker_ptr
,
const
details
::
log_msg
&
msg
,
async_overflow_policy
overflow_policy
)
{
async_msg
async_m
(
std
::
move
(
worker_ptr
),
async_msg_type
::
log
,
msg
);
post_async_msg_
(
std
::
move
(
async_m
),
overflow_policy
);
...
...
include/spdlog/details/thread_pool.h
View file @
0284a23d
...
...
@@ -63,7 +63,7 @@ struct async_msg : log_msg_buffer
#endif
// construct from log_msg with given type
async_msg
(
async_logger_ptr
&&
worker
,
async_msg_type
the_type
,
details
::
log_msg
&
m
)
async_msg
(
async_logger_ptr
&&
worker
,
async_msg_type
the_type
,
const
details
::
log_msg
&
m
)
:
log_msg_buffer
{
m
}
,
msg_type
{
the_type
}
,
worker_ptr
{
std
::
move
(
worker
)}
...
...
@@ -95,7 +95,7 @@ public:
thread_pool
(
const
thread_pool
&
)
=
delete
;
thread_pool
&
operator
=
(
thread_pool
&&
)
=
delete
;
void
post_log
(
async_logger_ptr
&&
worker_ptr
,
details
::
log_msg
&
msg
,
async_overflow_policy
overflow_policy
);
void
post_log
(
async_logger_ptr
&&
worker_ptr
,
const
details
::
log_msg
&
msg
,
async_overflow_policy
overflow_policy
);
void
post_flush
(
async_logger_ptr
&&
worker_ptr
,
async_overflow_policy
overflow_policy
);
size_t
overrun_counter
();
...
...
include/spdlog/logger-inl.h
View file @
0284a23d
...
...
@@ -161,7 +161,7 @@ SPDLOG_INLINE std::shared_ptr<logger> logger::clone(std::string logger_name)
}
// protected methods
SPDLOG_INLINE
void
logger
::
sink_it_
(
details
::
log_msg
&
msg
)
SPDLOG_INLINE
void
logger
::
sink_it_
(
const
details
::
log_msg
&
msg
)
{
for
(
auto
&
sink
:
sinks_
)
{
...
...
include/spdlog/logger.h
View file @
0284a23d
...
...
@@ -346,7 +346,7 @@ protected:
spdlog
::
level_t
flush_level_
{
level
::
off
};
err_handler
custom_err_handler_
{
nullptr
};
virtual
void
sink_it_
(
details
::
log_msg
&
msg
);
virtual
void
sink_it_
(
const
details
::
log_msg
&
msg
);
virtual
void
flush_
();
bool
should_flush_
(
const
details
::
log_msg
&
msg
);
...
...
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