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
0fdb545d
Commit
0fdb545d
authored
Jun 26, 2021
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed clang c++20 compile
parent
a5f5ff70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+6
-6
No files found.
include/spdlog/sinks/daily_file_sink.h
View file @
0fdb545d
...
...
@@ -39,18 +39,18 @@ struct daily_filename_calculator
/*
* Generator of daily log file names with strftime format.
* Usages:
* Usages:
* auto sink = std::make_shared<spdlog::sinks::daily_file_format_sink_mt>("myapp-%Y-%m-%d:%H:%M:%S.log", hour, minute);"
* auto logger = spdlog::daily_logger_format_mt("loggername, "myapp-%Y-%m-%d:%X.log", hour, minute)"
*
*
*/
struct
daily_filename_format_calculator
{
static
filename_t
calc_filename
(
const
filename_t
&
filename
,
const
tm
&
now_tm
)
static
filename_t
calc_filename
(
const
filename_t
&
filename
,
const
tm
&
now_tm
)
{
// generate fmt datetime format string, e.g. {:%Y-%m-%d}.
filename_t
fmt_filename
=
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{{:{}}}"
),
filename
);
return
fmt
::
format
(
fmt
_filename
,
now_tm
);
// generate fmt datetime format string, e.g. {:%Y-%m-%d}.
filename_t
fmt_filename
=
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{{:{}}}"
),
filename
);
return
fmt
::
format
(
fmt
::
runtime
(
fmt_filename
)
,
now_tm
);
}
};
...
...
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