mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add SetLogLevel() to the public API
While the callback can filter log messages to the desired level, setting the log level in libloot means that it can avoid doing work to construct error messages that may then be discarded.
This commit is contained in:
@@ -57,6 +57,15 @@ namespace loot {
|
||||
LOOT_API void SetLoggingCallback(
|
||||
std::function<void(LogLevel, const char*)> callback);
|
||||
|
||||
/**
|
||||
* @brief Set the log severity level.
|
||||
* @details The default level setting is trace. This function has no effect if
|
||||
* no logging callback has been set.
|
||||
* @param level
|
||||
* Messages of this severity level and higher will be logged.
|
||||
*/
|
||||
LOOT_API void SetLogLevel(LogLevel level);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Version Functions
|
||||
|
||||
Reference in New Issue
Block a user