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
d5a3bb52
Commit
d5a3bb52
authored
Feb 24, 2018
by
Daniel Chabrowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readability-else-after-return
parent
9ebb9ff3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
17 deletions
+11
-17
async_log_helper.h
include/spdlog/details/async_log_helper.h
+4
-7
os.h
include/spdlog/details/os.h
+1
-4
pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+3
-3
file_sinks.h
include/spdlog/sinks/file_sinks.h
+3
-3
No files found.
include/spdlog/details/async_log_helper.h
View file @
d5a3bb52
...
...
@@ -328,13 +328,10 @@ inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_
// Handle empty queue..
// This is the only place where the queue can terminate or flush to avoid losing messages already in the queue
else
{
auto
now
=
details
::
os
::
now
();
handle_flush_interval
(
now
,
last_flush
);
sleep_or_yield
(
now
,
last_pop
);
return
!
_terminate_requested
;
}
auto
now
=
details
::
os
::
now
();
handle_flush_interval
(
now
,
last_flush
);
sleep_or_yield
(
now
,
last_pop
);
return
!
_terminate_requested
;
}
// flush all sinks if _flush_interval_ms has expired
...
...
include/spdlog/details/os.h
View file @
d5a3bb52
...
...
@@ -403,10 +403,7 @@ inline std::string errno_to_string(char buf[256], int res)
{
return
std
::
string
(
buf
);
}
else
{
return
"Unknown error"
;
}
return
"Unknown error"
;
}
// Return errno string (thread safe)
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
d5a3bb52
...
...
@@ -662,10 +662,10 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
inline
std
::
tm
spdlog
::
pattern_formatter
::
get_time
(
details
::
log_msg
&
msg
)
{
if
(
_pattern_time
==
pattern_time_type
::
local
)
if
(
_pattern_time
==
pattern_time_type
::
local
)
{
return
details
::
os
::
localtime
(
log_clock
::
to_time_t
(
msg
.
time
));
else
return
details
::
os
::
gmtime
(
log_clock
::
to_time_t
(
msg
.
time
));
}
return
details
::
os
::
gmtime
(
log_clock
::
to_time_t
(
msg
.
time
));
}
inline
void
spdlog
::
pattern_formatter
::
format
(
details
::
log_msg
&
msg
)
...
...
include/spdlog/sinks/file_sinks.h
View file @
d5a3bb52
...
...
@@ -236,10 +236,10 @@ private:
date
.
tm_min
=
_rotation_m
;
date
.
tm_sec
=
0
;
auto
rotation_time
=
std
::
chrono
::
system_clock
::
from_time_t
(
std
::
mktime
(
&
date
));
if
(
rotation_time
>
now
)
if
(
rotation_time
>
now
)
{
return
rotation_time
;
else
return
std
::
chrono
::
system_clock
::
time_point
(
rotation_time
+
std
::
chrono
::
hours
(
24
));
}
return
std
::
chrono
::
system_clock
::
time_point
(
rotation_time
+
std
::
chrono
::
hours
(
24
));
}
filename_t
_base_filename
;
...
...
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