mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-09 18:41:11 +01:00
Fixed: Fix termux background command logging at verbose level if CUSTOM_LOG_LEVEL was not passed
This commit is contained in:
parent
d222102635
commit
006bfeac8d
1 changed files with 3 additions and 1 deletions
|
|
@ -470,7 +470,9 @@ public class Logger {
|
||||||
/** Check if custom log level is valid and >= {@link #CURRENT_LOG_LEVEL}. If custom log level is
|
/** 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}. */
|
* not valid then {@link #LOG_LEVEL_VERBOSE} must be >= {@link #CURRENT_LOG_LEVEL}. */
|
||||||
public static boolean shouldEnableLoggingForCustomLogLevel(Integer customLogLevel) {
|
public static boolean shouldEnableLoggingForCustomLogLevel(Integer customLogLevel) {
|
||||||
if (customLogLevel == null || CURRENT_LOG_LEVEL <= LOG_LEVEL_OFF || customLogLevel <= LOG_LEVEL_OFF) return false;
|
if (CURRENT_LOG_LEVEL <= LOG_LEVEL_OFF) return false;
|
||||||
|
if (customLogLevel == null) return CURRENT_LOG_LEVEL >= LOG_LEVEL_VERBOSE; // Use default app log level
|
||||||
|
if (customLogLevel <= LOG_LEVEL_OFF) return false;
|
||||||
customLogLevel = Logger.isLogLevelValid(customLogLevel) ? customLogLevel: Logger.LOG_LEVEL_VERBOSE;
|
customLogLevel = Logger.isLogLevelValid(customLogLevel) ? customLogLevel: Logger.LOG_LEVEL_VERBOSE;
|
||||||
return (customLogLevel >= CURRENT_LOG_LEVEL);
|
return (customLogLevel >= CURRENT_LOG_LEVEL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue