mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Fixed: Ensure custom log level doesn't log if its off or null
This commit is contained in:
parent
bc779d2ffb
commit
197979fdcc
1 changed files with 1 additions and 0 deletions
|
|
@ -439,6 +439,7 @@ public class Logger {
|
|||
/** Check if custom log level is valid and >= {@link #CURRENT_LOG_LEVEL}. If custom log level is
|
||||
* not valid then {@link #LOG_LEVEL_VERBOSE} must be >= {@link #CURRENT_LOG_LEVEL}. */
|
||||
public static boolean shouldEnableLoggingForCustomLogLevel(Integer customLogLevel) {
|
||||
if (customLogLevel == null || CURRENT_LOG_LEVEL == LOG_LEVEL_OFF) return false;
|
||||
customLogLevel = Logger.isLogLevelValid(customLogLevel) ? customLogLevel: Logger.LOG_LEVEL_VERBOSE;
|
||||
return (customLogLevel >= CURRENT_LOG_LEVEL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue