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
8f3c4218
Commit
8f3c4218
authored
Apr 20, 2018
by
Puasonych
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'gabime/master'
parents
1136bd7c
217ad75e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
include/spdlog/details/logger_impl.h
include/spdlog/details/logger_impl.h
+2
-5
tests/utils.cpp
tests/utils.cpp
+1
-0
No files found.
include/spdlog/details/logger_impl.h
View file @
8f3c4218
...
...
@@ -6,7 +6,6 @@
#pragma once
#include "../logger.h"
#include "../sinks/stdout_sinks.h"
#include <memory>
#include <string>
...
...
@@ -345,13 +344,11 @@ inline void spdlog::logger::_default_err_handler(const std::string &msg)
{
return
;
}
_last_err_time
=
now
;
auto
tm_time
=
details
::
os
::
localtime
(
now
);
char
date_buf
[
100
];
std
::
strftime
(
date_buf
,
sizeof
(
date_buf
),
"%Y-%m-%d %H:%M:%S"
,
&
tm_time
);
details
::
log_msg
err_msg
;
err_msg
.
formatted
.
write
(
"[*** LOG ERROR ***] [{}] [{}] [{}]{}"
,
name
(),
msg
,
date_buf
,
details
::
os
::
default_eol
);
sinks
::
stderr_sink_mt
::
instance
()
->
log
(
err_msg
);
_last_err_time
=
now
;
fmt
::
print
(
stderr
,
"[*** LOG ERROR ***] [{}] [{}] {}
\n
"
,
date_buf
,
name
(),
msg
);
}
inline
bool
spdlog
::
logger
::
_should_flush_on
(
const
details
::
log_msg
&
msg
)
...
...
tests/utils.cpp
View file @
8f3c4218
...
...
@@ -8,6 +8,7 @@ void prepare_logdir()
system
(
"del /F /Q logs
\\
*"
);
#else
auto
rv
=
system
(
"mkdir -p logs"
);
(
void
)
rv
;
rv
=
system
(
"rm -f logs/*"
);
(
void
)
rv
;
#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