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
312fe477
Commit
312fe477
authored
Oct 12, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SPDLOG_DISABLE_DEFAULT_LOGGER option to tweakme.h
parent
b368d18b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
example.cpp
example/example.cpp
+0
-1
registry.h
include/spdlog/details/registry.h
+7
-2
tweakme.h
include/spdlog/tweakme.h
+8
-0
No files found.
example/example.cpp
View file @
312fe477
...
...
@@ -28,7 +28,6 @@ void clone_example();
int
main
(
int
,
char
*
[])
{
spdlog
::
info
(
"Welcome to spdlog version {}.{}.{} !"
,
SPDLOG_VER_MAJOR
,
SPDLOG_VER_MINOR
,
SPDLOG_VER_PATCH
);
spdlog
::
warn
(
"Easy padding in numbers like {:08d}"
,
12
);
spdlog
::
critical
(
"Support for int: {0:d}; hex: {0:x}; oct: {0:o}; bin: {0:b}"
,
42
);
...
...
include/spdlog/details/registry.h
View file @
312fe477
...
...
@@ -215,15 +215,20 @@ private:
registry
()
:
formatter_
(
new
pattern_formatter
(
"%+"
))
{
// create default logger (stdout_color_mt).
#ifndef SPDLOG_DISABLE_DEFAULT_LOGGER
// create default logger (ansicolor_stdout_sink_mt or wincolor_stdout_sink_mt in windows).
#ifdef _WIN32
auto
color_sink
=
std
::
make_shared
<
sinks
::
wincolor_stdout_sink_mt
>
();
#else
auto
color_sink
=
std
::
make_shared
<
sinks
::
ansicolor_stdout_sink_mt
>
();
#endif
SPDLOG_CONSTEXPR
const
char
*
default_logger_name
=
""
;
const
char
*
default_logger_name
=
""
;
default_logger_
=
std
::
make_shared
<
spdlog
::
logger
>
(
default_logger_name
,
std
::
move
(
color_sink
));
loggers_
[
default_logger_name
]
=
default_logger_
;
#endif // SPDLOG_DISABLE_DEFAULT_LOGGER
}
~
registry
()
=
default
;
...
...
include/spdlog/tweakme.h
View file @
312fe477
...
...
@@ -121,3 +121,11 @@
// #define SPDLOG_LEVEL_NAMES { "MY TRACE", "MY DEBUG", "MY INFO", "MY WARNING",
// "MY ERROR", "MY CRITICAL", "OFF" }
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to disable default logger creation.
// This might save some small initialization time
//
// #define SPDLOG_DISABLE_DEFAULT_LOGGER
///////////////////////////////////////////////////////////////////////////////
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