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:
Oliver Hamlet
2025-03-15 14:38:38 +00:00
parent 1748dc7a3c
commit 2f3e61c1f5
5 changed files with 72 additions and 0 deletions
+9
View File
@@ -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