Changed!: Changes introduced to disable/change logging in 60f37bde now also apply to stdin and plugin command results

This commit is contained in:
agnostic-apollo
2021-08-21 05:26:22 +05:00
parent 956e20e53d
commit e889d84dc4
7 changed files with 63 additions and 44 deletions

View File

@@ -436,4 +436,11 @@ public class Logger {
return (logLevel != null && logLevel >= LOG_LEVEL_OFF && logLevel <= MAX_LOG_LEVEL);
}
/** 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) {
customLogLevel = Logger.isLogLevelValid(customLogLevel) ? customLogLevel: Logger.LOG_LEVEL_VERBOSE;
return (customLogLevel >= CURRENT_LOG_LEVEL);
}
}