emilk / loguru

A lightweight C++ logging library
The Unlicense
1.76k stars 255 forks source link

how to release loguru #172

Open RoJoHub opened 3 years ago

RoJoHub commented 3 years ago

how to release loguru?

loguru::add_file("everything.log", loguru::Append, loguru::Verbosity_MAX);
loguru::add_file("everything.log", loguru::Append, loguru::Verbosity_MAX);
LOG_F(INFO, "I'm hungry for some %.3f!", 3.14159);    

In this case, the log will be printed twice

virtuosonic commented 3 months ago

From the documentation:

To stop the file logging, just call loguru::remove_callback(path) with the same path.