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
c4438966
Unverified
Commit
c4438966
authored
Feb 03, 2019
by
Gabi Melman
Committed by
GitHub
Feb 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #986 from DanielChabrowski/sink-allow-custom-formatter
Allow custom formatter in sink's ctor
parents
c5552dac
79f11bd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
sink.h
include/spdlog/sinks/sink.h
+5
-10
No files found.
include/spdlog/sinks/sink.h
View file @
c4438966
...
...
@@ -14,15 +14,10 @@ namespace sinks {
class
sink
{
public
:
sink
()
:
level_
(
level
::
trace
)
,
formatter_
(
new
pattern_formatter
())
{
}
sink
()
=
default
;
explicit
sink
(
std
::
unique_ptr
<
spdlog
::
pattern_formatter
>
formatter
)
:
level_
(
level
::
trace
)
,
formatter_
(
std
::
move
(
formatter
))
explicit
sink
(
std
::
unique_ptr
<
spdlog
::
formatter
>
formatter
)
:
formatter_
{
std
::
move
(
formatter
)}
{
}
...
...
@@ -49,10 +44,10 @@ public:
protected
:
// sink log level - default is all
level_t
level_
;
level_t
level_
{
level
::
trace
}
;
// sink formatter - default is full format
std
::
unique_ptr
<
spdlog
::
formatter
>
formatter_
;
std
::
unique_ptr
<
spdlog
::
formatter
>
formatter_
{
details
::
make_unique
<
spdlog
::
pattern_formatter
>
()}
;
};
}
// namespace sinks
...
...
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