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
2c32f826
Commit
2c32f826
authored
Aug 20, 2016
by
gabime
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/gabime/spdlog
parents
c4298a98
c16f89d0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
3 deletions
+10
-3
README.md
README.md
+0
-0
example.cpp
example/example.cpp
+4
-1
registry.h
include/spdlog/details/registry.h
+0
-0
spdlog_impl.h
include/spdlog/details/spdlog_impl.h
+0
-0
spdlog.h
include/spdlog/spdlog.h
+0
-0
registry.cpp
tests/registry.cpp
+6
-2
No files found.
README.md
View file @
2c32f826
example/example.cpp
View file @
2c32f826
...
...
@@ -80,7 +80,10 @@ int main(int, char*[])
err_handler_example
();
// Apply a function on all registered loggers
spd
::
apply_all
([
&
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
l
->
info
(
"End of example."
);
});
spd
::
apply_all
([
&
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
l
->
info
(
"End of example."
);
});
// Release and close all loggers
spdlog
::
drop_all
();
...
...
include/spdlog/details/registry.h
View file @
2c32f826
include/spdlog/details/spdlog_impl.h
View file @
2c32f826
include/spdlog/spdlog.h
View file @
2c32f826
tests/registry.cpp
View file @
2c32f826
...
...
@@ -32,7 +32,10 @@ TEST_CASE("apply_all" "[registry]")
spdlog
::
register_logger
(
logger2
);
int
counter
=
0
;
spdlog
::
apply_all
([
&
counter
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
){
counter
++
;});
spdlog
::
apply_all
([
&
counter
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
counter
++
;
});
REQUIRE
(
counter
==
2
);
counter
=
0
;
...
...
@@ -40,7 +43,8 @@ TEST_CASE("apply_all" "[registry]")
spdlog
::
apply_all
([
&
counter
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
REQUIRE
(
l
->
name
()
==
tested_logger_name
);
counter
++
;
}
counter
++
;
}
);
REQUIRE
(
counter
==
1
);
}
...
...
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