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
2894e8de
Commit
2894e8de
authored
Jul 24, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang format
parent
74c10df1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
3 deletions
+5
-3
Makefile
bench/Makefile
+0
-0
example.cpp
example/example.cpp
+4
-3
async.h
include/spdlog/async.h
+0
-0
periodic_worker.h
include/spdlog/details/periodic_worker.h
+0
-0
registry.h
include/spdlog/details/registry.h
+0
-0
spdlog.h
include/spdlog/spdlog.h
+1
-0
No files found.
bench/Makefile
View file @
2894e8de
example/example.cpp
View file @
2894e8de
...
@@ -23,6 +23,7 @@ void syslog_example();
...
@@ -23,6 +23,7 @@ void syslog_example();
int
main
(
int
,
char
*
[])
int
main
(
int
,
char
*
[])
{
{
try
try
{
{
// console logging example
// console logging example
...
@@ -52,8 +53,8 @@ int main(int, char *[])
...
@@ -52,8 +53,8 @@ int main(int, char *[])
// apply some function on all registered loggers
// apply some function on all registered loggers
spdlog
::
apply_all
([
&
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
l
->
info
(
"End of example."
);
});
spdlog
::
apply_all
([
&
](
std
::
shared_ptr
<
spdlog
::
logger
>
l
)
{
l
->
info
(
"End of example."
);
});
//
Release and close all loggers
//
release any threads created by spdlog, and drop all loggers in the registry.
spdlog
::
drop_all
();
spdlog
::
shutdown
();
}
}
// Exceptions will only be thrown upon failed logger or sink construction (not during logging)
// Exceptions will only be thrown upon failed logger or sink construction (not during logging)
catch
(
const
spdlog
::
spdlog_ex
&
ex
)
catch
(
const
spdlog
::
spdlog_ex
&
ex
)
...
@@ -69,7 +70,7 @@ void stdout_example()
...
@@ -69,7 +70,7 @@ void stdout_example()
{
{
// create color multi threaded logger
// create color multi threaded logger
auto
console
=
spdlog
::
stdout_color_mt
(
"console"
);
auto
console
=
spdlog
::
stdout_color_mt
(
"console"
);
console
->
info
(
"Welcome to spdlog
!"
);
console
->
info
(
"Welcome to spdlog
version {}.{}.{} !"
,
SPDLOG_VER_MAJOR
,
SPDLOG_VER_MINOR
,
SPDLOG_VER_PATCH
);
console
->
error
(
"Some error message with arg: {}"
,
1
);
console
->
error
(
"Some error message with arg: {}"
,
1
);
auto
err_logger
=
spdlog
::
stderr_color_mt
(
"stderr"
);
auto
err_logger
=
spdlog
::
stderr_color_mt
(
"stderr"
);
...
...
include/spdlog/async.h
View file @
2894e8de
include/spdlog/details/periodic_worker.h
View file @
2894e8de
include/spdlog/details/registry.h
View file @
2894e8de
include/spdlog/spdlog.h
View file @
2894e8de
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include "spdlog/common.h"
#include "spdlog/common.h"
#include "spdlog/details/registry.h"
#include "spdlog/details/registry.h"
#include "spdlog/logger.h"
#include "spdlog/logger.h"
#include "spdlog/version.h"
#include <chrono>
#include <chrono>
#include <functional>
#include <functional>
...
...
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