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
96b7214a
Commit
96b7214a
authored
Apr 06, 2019
by
gabime
Browse files
Options
Browse Files
Download
Plain Diff
fix common.h
parents
1b0752b0
02329f61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
README.md
README.md
+2
-0
common.h
include/spdlog/common.h
+1
-1
spdlog.h
include/spdlog/spdlog.h
+4
-1
No files found.
README.md
View file @
96b7214a
...
...
@@ -79,6 +79,8 @@ async... Elapsed: 0.349851 2,858,358/sec
#### Basic usage
```
c++
#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
int
main
()
{
spdlog
::
info
(
"Welcome to spdlog!"
);
...
...
include/spdlog/common.h
View file @
96b7214a
...
...
@@ -72,7 +72,7 @@
#if defined(_WIN32) && defined(SPDLOG_WCHAR_FILENAMES)
using
filename_t
=
std
::
wstring
;
#define SPDLOG_FILENAME_T(s) L##s
SPDLOG_INLINE
std
::
string
filename_to_str
(
const
filename_t
&
filename
)
inline
std
::
string
filename_to_str
(
const
filename_t
&
filename
)
{
std
::
wstring_convert
<
std
::
codecvt_utf8
<
wchar_t
>
,
wchar_t
>
c
;
return
c
.
to_bytes
(
filename
);
...
...
include/spdlog/spdlog.h
View file @
96b7214a
...
...
@@ -328,7 +328,10 @@ inline void critical(const wchar_t *fmt, const Args &... args)
//
#define SPDLOG_LOGGER_CALL(logger, level, ...) \
logger->log(spdlog::source_loc{SPDLOG_FILE_BASENAME(__FILE__), __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
do { \
if (logger->should_log(level)) \
logger->log(spdlog::source_loc{SPDLOG_FILE_BASENAME(__FILE__), __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__); \
} while (0)
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
#define SPDLOG_LOGGER_TRACE(logger, ...) SPDLOG_LOGGER_CALL(logger, spdlog::level::trace, __VA_ARGS__)
...
...
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