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
72a6fd65
Commit
72a6fd65
authored
Sep 14, 2016
by
Hugh Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support direct creation of android logger.
parent
bf02f574
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
include/spdlog/details/spdlog_impl.h
include/spdlog/details/spdlog_impl.h
+8
-0
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+3
-0
No files found.
include/spdlog/details/spdlog_impl.h
View file @
72a6fd65
...
...
@@ -14,6 +14,7 @@
#include <spdlog/sinks/stdout_sinks.h>
#include <spdlog/sinks/syslog_sink.h>
#include <spdlog/sinks/ansicolor_sink.h>
#include <spdlog/sinks/android_sink.h>
#include <chrono>
#include <functional>
...
...
@@ -104,6 +105,13 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
}
#endif
#if defined(__ANDROID__)
inline
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
android_logger
(
const
std
::
string
&
logger_name
,
const
std
::
string
&
tag
)
{
return
create
<
spdlog
::
sinks
::
android_sink
>
(
logger_name
,
tag
);
}
#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
)
{
...
...
include/spdlog/spdlog.h
View file @
72a6fd65
...
...
@@ -101,6 +101,9 @@ std::shared_ptr<logger> stderr_logger_st(const std::string& logger_name, bool co
std
::
shared_ptr
<
logger
>
syslog_logger
(
const
std
::
string
&
logger_name
,
const
std
::
string
&
ident
=
""
,
int
syslog_option
=
0
);
#endif
#if defined(__ANDROID__)
std
::
shared_ptr
<
logger
>
android_logger
(
const
std
::
string
&
logger_name
,
const
std
::
string
&
tag
=
"spdlog"
);
#endif
// Create and register a logger a single sink
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
const
sink_ptr
&
sink
);
...
...
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