mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Changed: Make allowed custom log level added in 60f37bde
to be more restrictive
This commit is contained in:
@@ -439,7 +439,7 @@ 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) return false;
|
if (customLogLevel == null || CURRENT_LOG_LEVEL <= LOG_LEVEL_OFF || 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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user