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
d352aa09
Commit
d352aa09
authored
Apr 09, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed example
parent
cfb450c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
example/example.cpp
example/example.cpp
+0
-10
No files found.
example/example.cpp
View file @
d352aa09
...
@@ -26,17 +26,8 @@ int main(int, char *[])
...
@@ -26,17 +26,8 @@ int main(int, char *[])
{
{
try
try
{
{
spdlog
::
set_async_mode
(
1024
);
// Console logger with color
// Console logger with color
auto
console
=
spd
::
stdout_color_mt
(
"console"
);
auto
console
=
spd
::
stdout_color_mt
(
"console"
);
for
(
int
i
=
0
;
i
<
2000
;
i
++
)
{
console
->
info
(
"{} Hello thread pool!"
,
i
);
}
return
0
;
console
->
info
(
"Welcome to spdlog!"
);
console
->
info
(
"Welcome to spdlog!"
);
console
->
error
(
"Some error message with arg{}.."
,
1
);
console
->
error
(
"Some error message with arg{}.."
,
1
);
...
@@ -48,7 +39,6 @@ int main(int, char *[])
...
@@ -48,7 +39,6 @@ int main(int, char *[])
console
->
info
(
"{:<30}"
,
"left aligned"
);
console
->
info
(
"{:<30}"
,
"left aligned"
);
spd
::
get
(
"console"
)
->
info
(
"loggers can be retrieved from a global registry using the spdlog::get(logger_name) function"
);
spd
::
get
(
"console"
)
->
info
(
"loggers can be retrieved from a global registry using the spdlog::get(logger_name) function"
);
return
0
;
// Create basic file logger (not rotated)
// Create basic file logger (not rotated)
auto
my_logger
=
spd
::
basic_logger_mt
(
"basic_logger"
,
"logs/basic-log.txt"
);
auto
my_logger
=
spd
::
basic_logger_mt
(
"basic_logger"
,
"logs/basic-log.txt"
);
...
...
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