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
fe1a4f5f
Commit
fe1a4f5f
authored
Jul 20, 2021
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added SPDLOG_FMT_RUNTIME macro for compatibilty with fmt prior 8
parent
d38f89ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
include/spdlog/common.h
include/spdlog/common.h
+3
-0
include/spdlog/logger.h
include/spdlog/logger.h
+1
-2
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+1
-1
No files found.
include/spdlog/common.h
View file @
fe1a4f5f
...
...
@@ -37,9 +37,12 @@
// backward compatibility with fmt versions older than 8
#if FMT_VERSION >= 80000
# define SPDLOG_FMT_RUNTIME(format_string) fmt::runtime(format_string)
# if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
# include <spdlog/fmt/xchar.h>
# endif
#else
# define SPDLOG_FMT_RUNTIME(format_string) format_string
#endif
// visual studio upto 2013 does not support noexcept nor constexpr
...
...
include/spdlog/logger.h
View file @
fe1a4f5f
...
...
@@ -268,8 +268,7 @@ protected:
err_handler
custom_err_handler_
{
nullptr
};
details
::
backtracer
tracer_
;
// common implementation for after templated public api has been resolved
// common implementation for after templated public api has been resolved
template
<
typename
FormatString
,
typename
...
Args
,
typename
Char
=
fmt
::
char_t
<
FormatString
>,
typename
std
::
enable_if
<!
std
::
is_same
<
Char
,
wchar_t
>::
value
,
Char
>::
type
*
=
nullptr
>
void
log_
(
source_loc
loc
,
level
::
level_enum
lvl
,
const
FormatString
&
fmt
,
Args
&&
...
args
)
...
...
include/spdlog/sinks/daily_file_sink.h
View file @
fe1a4f5f
...
...
@@ -53,7 +53,7 @@ struct daily_filename_format_calculator
#if defined(_MSC_VER) && defined(SPDLOG_WCHAR_FILENAMES) // for some reason msvc doesnt allow fmt::runtime(..) with wchar here
return
fmt
::
format
(
fmt_filename
,
now_tm
);
#else
return
fmt
::
format
(
fmt
::
runtime
(
fmt_filename
),
now_tm
);
return
fmt
::
format
(
SPDLOG_FMT_RUNTIME
(
fmt_filename
),
now_tm
);
#endif
}
};
...
...
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