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
25afbd79
Commit
25afbd79
authored
Apr 07, 2015
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added compile time option to turn off thread id (#define SPDLOG_NO_THREAD_ID in common.h)
parent
0684b4f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
include/spdlog/common.h
include/spdlog/common.h
+4
-0
include/spdlog/details/line_logger.h
include/spdlog/details/line_logger.h
+0
-2
include/spdlog/details/os.h
include/spdlog/details/os.h
+5
-1
No files found.
include/spdlog/common.h
View file @
25afbd79
...
...
@@ -44,6 +44,10 @@
//#define SPDLOG_CLOCK_COARSE
//#endif
// uncomment if thread id logging is needed - to gain few nanos
// #define SPDLOG_NO_THREAD_ID
//
namespace
spdlog
{
...
...
include/spdlog/details/line_logger.h
View file @
25afbd79
...
...
@@ -65,8 +65,6 @@ public:
_log_msg
.
logger_name
=
_callback_logger
->
name
();
_log_msg
.
time
=
os
::
now
();
_log_msg
.
thread_id
=
os
::
thread_id
();
_callback_logger
->
_log_msg
(
_log_msg
);
}
}
...
...
include/spdlog/details/os.h
View file @
25afbd79
...
...
@@ -175,6 +175,10 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime())
inline
size_t
thread_id
()
{
#ifdef SPDLOG_NO_THREAD_ID
return
0
;
#else
#ifdef _WIN32
return
::
GetCurrentThreadId
();
#elif __linux__
...
...
@@ -182,7 +186,7 @@ inline size_t thread_id()
#else
return
(
uint64_t
)
pthread_self
();
#endif
#endif //SPDLOG_NO_THREAD_ID
}
}
//os
...
...
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