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
09cb4500
Commit
09cb4500
authored
Jun 15, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added copy ctor and assignment to logger
parent
9d3aa5a2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
logger-inl.h
include/spdlog/logger-inl.h
+0
-0
logger.h
include/spdlog/logger.h
+15
-9
No files found.
include/spdlog/logger-inl.h
View file @
09cb4500
This diff is collapsed.
Click to expand it.
include/spdlog/logger.h
View file @
09cb4500
...
...
@@ -56,8 +56,11 @@ public:
virtual
~
logger
()
=
default
;
logger
(
const
logger
&
)
=
delete
;
logger
&
operator
=
(
const
logger
&
)
=
delete
;
logger
(
const
logger
&
other
);
logger
(
logger
&&
other
);
logger
&
operator
=
(
logger
other
);
void
swap
(
spdlog
::
logger
&
other
);
template
<
typename
...
Args
>
void
log
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
char
*
fmt
,
const
Args
&
...
args
)
...
...
@@ -328,23 +331,26 @@ public:
virtual
std
::
shared_ptr
<
logger
>
clone
(
std
::
string
logger_name
);
protected
:
virtual
void
sink_it_
(
details
::
log_msg
&
msg
);
std
::
string
name_
;
std
::
vector
<
sink_ptr
>
sinks_
;
spdlog
::
level_t
level_
{
spdlog
::
logger
::
default_level
()};
spdlog
::
level_t
flush_level_
{
level
::
off
};
err_handler
custom_err_handler_
{
nullptr
};
virtual
void
sink_it_
(
details
::
log_msg
&
msg
);
virtual
void
flush_
();
bool
should_flush_
(
const
details
::
log_msg
&
msg
);
// default error handler.
// print the error to stderr with the max rate of 1 message/minute.
void
err_handler_
(
const
std
::
string
&
msg
);
const
std
::
string
name_
;
std
::
vector
<
sink_ptr
>
sinks_
;
spdlog
::
level_t
level_
{
spdlog
::
logger
::
default_level
()};
spdlog
::
level_t
flush_level_
{
level
::
off
};
err_handler
custom_err_handler_
{
nullptr
};
};
void
swap
(
logger
&
a
,
logger
&
b
);
}
// namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
#include "logger-inl.h"
#endif
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