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
5d46f3fc
Commit
5d46f3fc
authored
Sep 15, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix windows build
parent
b55d95d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+2
-2
tests/test_daily_logger.cpp
tests/test_daily_logger.cpp
+1
-1
No files found.
include/spdlog/sinks/daily_file_sink.h
View file @
5d46f3fc
...
@@ -45,7 +45,7 @@ class daily_file_sink final : public base_sink<Mutex>
...
@@ -45,7 +45,7 @@ class daily_file_sink final : public base_sink<Mutex>
{
{
public:
public:
// create daily file sink which rotates on given time
// create daily file sink which rotates on given time
daily_file_sink
(
filename_t
base_filename
,
int
rotation_hour
,
int
rotation_minute
,
bool
truncate
=
false
,
u
shor
t
max_files
=
0
)
daily_file_sink
(
filename_t
base_filename
,
int
rotation_hour
,
int
rotation_minute
,
bool
truncate
=
false
,
u
int16_
t
max_files
=
0
)
:
base_filename_
(
std
::
move
(
base_filename
))
:
base_filename_
(
std
::
move
(
base_filename
))
,
rotation_h_
(
rotation_hour
)
,
rotation_h_
(
rotation_hour
)
,
rotation_m_
(
rotation_minute
)
,
rotation_m_
(
rotation_minute
)
...
@@ -157,7 +157,7 @@ private:
...
@@ -157,7 +157,7 @@ private:
log_clock
::
time_point
rotation_tp_
;
log_clock
::
time_point
rotation_tp_
;
details
::
file_helper
file_helper_
;
details
::
file_helper
file_helper_
;
bool
truncate_
;
bool
truncate_
;
u
shor
t
max_files_
;
u
int16_
t
max_files_
;
details
::
circular_q
<
filename_t
>
filenames_q_
;
details
::
circular_q
<
filename_t
>
filenames_q_
;
};
};
...
...
tests/test_daily_logger.cpp
View file @
5d46f3fc
...
@@ -110,7 +110,7 @@ static spdlog::details::log_msg create_msg(std::chrono::seconds offset)
...
@@ -110,7 +110,7 @@ static spdlog::details::log_msg create_msg(std::chrono::seconds offset)
return
msg
;
return
msg
;
}
}
static
void
test_rotate
(
int
days_to_run
,
u
short
max_days
,
ushor
t
expected_n_files
)
static
void
test_rotate
(
int
days_to_run
,
u
int16_t
max_days
,
uint16_
t
expected_n_files
)
{
{
using
spdlog
::
log_clock
;
using
spdlog
::
log_clock
;
using
spdlog
::
details
::
log_msg
;
using
spdlog
::
details
::
log_msg
;
...
...
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