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
4dd1a24d
Commit
4dd1a24d
authored
Apr 05, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip static lib
parent
c69c4904
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
example.cpp
example/example.cpp
+6
-2
registry.h
include/spdlog/details/registry.h
+1
-4
No files found.
example/example.cpp
View file @
4dd1a24d
...
...
@@ -14,6 +14,9 @@ spdlog::logger *get_logger();
int
main
(
int
,
char
*
[])
{
auto
*
l
=
get_logger
();
l
->
info
(
"HEllo {}"
,
"HG FS"
);
int
x
=
4
;
spdlog
::
info
(
"HELLO {}"
,
"st at ic"
);
spdlog
::
warn
(
"HELLO {}*{} = {}"
,
x
,
x
,
x
*
x
);
/*auto *l = get_logger();
l->info("HEllo {}", "HG FS");*/
}
\ No newline at end of file
include/spdlog/details/registry.h
View file @
4dd1a24d
...
...
@@ -34,18 +34,15 @@ public:
void
register_logger
(
std
::
shared_ptr
<
logger
>
new_logger
);
void
initialize_logger
(
std
::
shared_ptr
<
logger
>
new_logger
);
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
logger_name
);
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
logger_name
);
std
::
shared_ptr
<
logger
>
default_logger
();
// Return raw ptr to the default logger.
// To be used directly by the spdlog default api (e.g. spdlog::info)
// This make the default API faster, but cannot be used concurrently with set_default_logger().
// e.g do not call set_default_logger() from one thread while calling spdlog::info() from another.
logger
*
get_default_raw
();
// set default logger.
// default logger is stored in default_logger_ (for faster retrieval) and in the loggers_ map.
void
set_default_logger
(
std
::
shared_ptr
<
logger
>
new_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