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
87cc555d
Commit
87cc555d
authored
Mar 28, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
example
parent
5556967e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
example.cpp
example/example.cpp
+4
-1
No files found.
example/example.cpp
View file @
87cc555d
...
...
@@ -20,6 +20,9 @@ int main(int argc, char* argv[])
const
unsigned
int
howmany
=
argc
<=
1
?
1000
:
atoi
(
argv
[
1
]);
logger
cout_logger
(
""
,
sinks
::
stdout_sink
());
cout_logger
.
info
(
"Hello "
)
<<
"man"
;
auto
fsink
=
std
::
make_shared
<
sinks
::
rotating_file_sink
>
(
"log"
,
"txt"
,
1024
*
1024
*
50
,
5
,
0
);
logger
my_logger
(
"my_logger"
,
sinks
::
null_sink
::
get
());
...
...
@@ -31,7 +34,7 @@ int main(int argc, char* argv[])
auto
delta
=
system_clock
::
now
()
-
start
;
auto
delta_d
=
duration_cast
<
duration
<
double
>>
(
delta
).
count
();
logger
cout_logger
(
""
,
sinks
::
stdout_sink
());
cout_logger
.
info
(
"Total:"
)
<<
format
(
howmany
);
cout_logger
.
info
(
"Delta:"
)
<<
format
(
delta_d
);
cout_logger
.
info
(
"Rate:"
)
<<
format
(
howmany
/
delta_d
)
<<
"/sec"
;
...
...
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