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
380233b7
Commit
380233b7
authored
Jun 17, 2017
by
Asit Kumar Dhal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mend
parent
b463b06a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
0 deletions
+78
-0
logger_impl.h
include/spdlog/details/logger_impl.h
+78
-0
No files found.
include/spdlog/details/logger_impl.h
View file @
380233b7
...
...
@@ -380,6 +380,84 @@ inline void spdlog::logger::critical(const wchar_t* fmt, const Args&... args)
{
log
(
level
::
critical
,
fmt
,
args
...);
}
//
// conditional logging
//
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
log_if
(
const
bool
flag
,
level
::
level_enum
lvl
,
const
wchar_t
*
msg
)
{
if
(
flag
)
{
log
(
lvl
,
msg
);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
log_if
(
const
bool
flag
,
level
::
level_enum
lvl
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
lvl
,
fmt
,
args
);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
trace_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
trace
,
fmt
,
args
...);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
debug_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
debug
,
fmt
,
args
...);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
info_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
info
,
fmt
,
args
...);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
warn_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
warn
,
fmt
,
args
...);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
error_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
err
,
fmt
,
args
...);
}
}
template
<
typename
...
Args
>
inline
void
spdlog
::
logger
::
critical_if
(
const
bool
flag
,
const
wchar_t
*
fmt
,
const
Args
&
...
args
)
{
if
(
flag
)
{
log
(
level
::
critical
,
fmt
,
args
...);
}
}
#endif // SPDLOG_WCHAR_TO_UTF8_SUPPORT
...
...
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