mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-29 22:30:04 +00:00
Flush logs every 3 seconds or on logging info or higher
This commit is contained in:
parent
699f60d399
commit
9d6a0358d0
1 changed files with 6 additions and 0 deletions
|
|
@ -20,6 +20,12 @@ static std::vector<std::shared_ptr<spdlog::sinks::sink>> extraSinks_ {};
|
|||
void Initialize()
|
||||
{
|
||||
spdlog::set_pattern(logPattern_);
|
||||
|
||||
// Periodically flush every 3 seconds
|
||||
spdlog::flush_every(std::chrono::seconds(3));
|
||||
|
||||
// Flush whenever logging info or higher
|
||||
spdlog::flush_on(spdlog::level::level_enum::info);
|
||||
}
|
||||
|
||||
void AddFileSink(const std::string& baseFilename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue