mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-08 03:24:04 +08:00
Fixed: Stdin not being logged for background execution commands
This commit is contained in:
@@ -26,6 +26,7 @@ public class Logger {
|
||||
public static final int LOG_LEVEL_VERBOSE = 3; // start logging verbose messages
|
||||
|
||||
public static final int DEFAULT_LOG_LEVEL = LOG_LEVEL_NORMAL;
|
||||
public static final int MAX_LOG_LEVEL = LOG_LEVEL_VERBOSE;
|
||||
private static int CURRENT_LOG_LEVEL = DEFAULT_LOG_LEVEL;
|
||||
|
||||
/**
|
||||
@@ -413,7 +414,7 @@ public class Logger {
|
||||
}
|
||||
|
||||
public static int setLogLevel(Context context, int logLevel) {
|
||||
if (logLevel >= LOG_LEVEL_OFF && logLevel <= LOG_LEVEL_VERBOSE)
|
||||
if (isLogLevelValid(logLevel))
|
||||
CURRENT_LOG_LEVEL = logLevel;
|
||||
else
|
||||
CURRENT_LOG_LEVEL = DEFAULT_LOG_LEVEL;
|
||||
@@ -431,4 +432,8 @@ public class Logger {
|
||||
return DEFAULT_LOG_TAG + ":" + tag;
|
||||
}
|
||||
|
||||
public static boolean isLogLevelValid(Integer logLevel) {
|
||||
return (logLevel != null && logLevel >= LOG_LEVEL_OFF && logLevel <= MAX_LOG_LEVEL);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user