diff --git a/app/src/main/java/net/xndroid/fqrouter/FqrouterManager.java b/app/src/main/java/net/xndroid/fqrouter/FqrouterManager.java index 914964c..36cd73f 100755 --- a/app/src/main/java/net/xndroid/fqrouter/FqrouterManager.java +++ b/app/src/main/java/net/xndroid/fqrouter/FqrouterManager.java @@ -270,7 +270,7 @@ public void run() { + "sh " + sXndroidFile + "/python/bin" + (Build.VERSION.SDK_INT > 17 ? "/python-launcher.sh " : "/python-launcher-nopie.sh ") + sXndroidFile + "/fqrouter/manager/main.py run " - + ((AppModel.sDebug || AppModel.sLastFail) ? (" > " + sXndroidFile + "/log/fqrouter-output.log 2>&1 \n") : "\n") + + ((AppModel.sDebug || AppModel.sLastFail) ? (" > " + sXndroidFile + "/log/fqrouter-output.log 2>&1 \n") : " >/dev/null 2>&1\n") + "exit\n"; }else { cmd = "cd " + sXndroidFile + " \n" @@ -283,7 +283,7 @@ public void run() { + (Build.VERSION.SDK_INT > 17 ? "/python-launcher.sh " : "/python-launcher-nopie.sh ") + sXndroidFile + "/fqrouter/manager/vpn.py " + (Build.VERSION.SDK_INT >= 20 ? " 26.26.26.1 26.26.26.2 " : " 10.25.1.1 10.25.1.2 ") - + ((AppModel.sDebug || AppModel.sLastFail) ? (" > " + sXndroidFile + "/log/fqrouter-output.log 2>&1 \n") : "\n") + + ((AppModel.sDebug || AppModel.sLastFail) ? (" > " + sXndroidFile + "/log/fqrouter-output.log 2>&1 \n") : " >/dev/null 2>&1\n") + "exit\n"; } LogUtils.i("try to start fqrouter, cmd: " + cmd); diff --git a/fqrouter/manager/main.py b/fqrouter/manager/main.py index fdb04a3..8a2760f 100755 --- a/fqrouter/manager/main.py +++ b/fqrouter/manager/main.py @@ -143,7 +143,7 @@ def handle_exit(environ, start_response): def setup_logging(): - logging.basicConfig(stream=sys.stdout, level=logging.DEBUG if os.getenv('DEBUG') else (logging.CRITICAL + 1), format='%(asctime)s %(levelname)s %(message)s') + logging.basicConfig(stream=sys.stdout, level=logging.DEBUG if os.getenv('DEBUG') else logging.INFO, format='%(asctime)s %(levelname)s %(message)s') log_level = logging.DEBUG if os.getenv('DEBUG') else logging.INFO handler = logging.handlers.RotatingFileHandler( MANAGER_LOG_FILE, maxBytes=1024 * 512, backupCount=0)