mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Fix one more msg.time
.
This commit is contained in:
parent
6012d52fdb
commit
54e44ab477
@ -68,12 +68,13 @@ protected:
|
||||
void sink_it_(const details::log_msg &msg) override
|
||||
{
|
||||
#ifdef SPDLOG_NO_DATETIME
|
||||
if (log_clock::now() >= rotation_tp_)
|
||||
auto time = log_clock::now();
|
||||
#else
|
||||
if (msg.time >= rotation_tp_)
|
||||
auto time = msg.time;
|
||||
#endif
|
||||
if (time >= rotation_tp_)
|
||||
{
|
||||
file_helper_.open(FileNameCalc::calc_filename(base_filename_, now_tm(msg.time)), truncate_);
|
||||
file_helper_.open(FileNameCalc::calc_filename(base_filename_, now_tm(time)), truncate_);
|
||||
rotation_tp_ = next_rotation_tp_();
|
||||
}
|
||||
fmt::memory_buffer formatted;
|
||||
|
Loading…
Reference in New Issue
Block a user