mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:12:32 +08:00
[Logs]Don't create a thread for each logger (#22755)
This commit is contained in:
parent
f987a48b3a
commit
f465daf585
@ -91,8 +91,8 @@ void Logger::init(std::string loggerName, std::wstring logFilePath, std::wstring
|
||||
|
||||
logger->set_level(logLevel);
|
||||
logger->set_pattern("[%Y-%m-%d %H:%M:%S.%f] [p-%P] [t-%t] [%l] %v");
|
||||
logger->flush_on(logLevel); // Auto flush on every log message.
|
||||
spdlog::register_logger(logger);
|
||||
spdlog::flush_every(std::chrono::seconds(3));
|
||||
logger->info("{} logger is initialized", loggerName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user