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
d2a367fa
Commit
d2a367fa
authored
Sep 02, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests after remove of force_flush arg
parent
e562e001
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
file_log.cpp
tests/file_log.cpp
+5
-3
No files found.
tests/file_log.cpp
View file @
d2a367fa
...
...
@@ -25,7 +25,8 @@ TEST_CASE("rotating_file_logger1", "[rotating_logger]]")
{
prepare_logdir
();
std
::
string
basename
=
"logs/rotating_log"
;
auto
logger
=
spdlog
::
rotating_logger_mt
(
"logger"
,
basename
,
1024
,
0
,
true
);
auto
logger
=
spdlog
::
rotating_logger_mt
(
"logger"
,
basename
,
1024
,
0
);
logger
->
flush_on
(
spdlog
::
level
::
info
);
for
(
int
i
=
0
;
i
<
10
;
++
i
)
logger
->
info
(
"Test message {}"
,
i
);
...
...
@@ -41,7 +42,7 @@ TEST_CASE("rotating_file_logger2", "[rotating_logger]]")
{
prepare_logdir
();
std
::
string
basename
=
"logs/rotating_log"
;
auto
logger
=
spdlog
::
rotating_logger_mt
(
"logger"
,
basename
,
1024
,
1
,
false
);
auto
logger
=
spdlog
::
rotating_logger_mt
(
"logger"
,
basename
,
1024
,
1
);
for
(
int
i
=
0
;
i
<
10
;
++
i
)
logger
->
info
(
"Test message {}"
,
i
);
...
...
@@ -68,7 +69,8 @@ TEST_CASE("daily_logger", "[daily_logger]]")
fmt
::
MemoryWriter
w
;
w
.
write
(
"{}_{:04d}-{:02d}-{:02d}_{:02d}-{:02d}.txt"
,
basename
,
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
tm
.
tm_hour
,
tm
.
tm_min
);
auto
logger
=
spdlog
::
daily_logger_mt
(
"logger"
,
basename
,
0
,
0
,
true
);
auto
logger
=
spdlog
::
daily_logger_mt
(
"logger"
,
basename
,
0
,
0
);
logger
->
flush_on
(
spdlog
::
level
::
info
);
for
(
int
i
=
0
;
i
<
10
;
++
i
)
logger
->
info
(
"Test message {}"
,
i
);
...
...
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