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
fafe88c3
Commit
fafe88c3
authored
Jun 18, 2016
by
Gabi Melman
Committed by
GitHub
Jun 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #227 from godbyk/create-logger-single-sink
Create a logger with a single sink
parents
33a18518
e16cb511
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
include/spdlog/details/spdlog_impl.h
include/spdlog/details/spdlog_impl.h
+5
-0
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+3
-0
No files found.
include/spdlog/details/spdlog_impl.h
View file @
fafe88c3
...
@@ -93,6 +93,11 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
...
@@ -93,6 +93,11 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
}
}
#endif
#endif
// Create and register a logger a single sink
inline
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
create
(
const
std
::
string
&
logger_name
,
const
spdlog
::
sink_ptr
&
sink
)
{
return
details
::
registry
::
instance
().
create
(
logger_name
,
sink
);
}
//Create logger with multiple sinks
//Create logger with multiple sinks
...
...
include/spdlog/spdlog.h
View file @
fafe88c3
...
@@ -91,6 +91,9 @@ std::shared_ptr<logger> syslog_logger(const std::string& logger_name, const std:
...
@@ -91,6 +91,9 @@ std::shared_ptr<logger> syslog_logger(const std::string& logger_name, const std:
#endif
#endif
// Create and register a logger a single sink
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
const
sink_ptr
&
sink
);
// Create and register a logger with multiple sinks
// Create and register a logger with multiple sinks
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
sinks_init_list
sinks
);
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
sinks_init_list
sinks
);
template
<
class
It
>
template
<
class
It
>
...
...
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