From 2fdbbc2062558e8a52ca726399c33095e0426a07 Mon Sep 17 00:00:00 2001 From: yangdx Date: Fri, 21 Feb 2025 20:01:43 +0800 Subject: [PATCH] Reorder and improve command line argument definitions for better organization - Change verbose to store_true action - Move verbose flag to logging section - Move auto-scan flag to end of options --- lightrag/api/utils_api.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lightrag/api/utils_api.py b/lightrag/api/utils_api.py index b24331af..5d29cb6e 100644 --- a/lightrag/api/utils_api.py +++ b/lightrag/api/utils_api.py @@ -180,6 +180,12 @@ def parse_args() -> argparse.Namespace: choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"], help="Logging level (default: from env or INFO)", ) + parser.add_argument( + "--verbose", + action="store_true", + default=get_env_value("VERBOSE", False, bool), + help="Enable verbose debug output(only valid for DEBUG log-level)", + ) parser.add_argument( "--key", @@ -205,12 +211,6 @@ def parse_args() -> argparse.Namespace: default=get_env_value("SSL_KEYFILE", None), help="Path to SSL private key file (required if --ssl is enabled)", ) - parser.add_argument( - "--auto-scan-at-startup", - action="store_true", - default=False, - help="Enable automatic scanning when the program starts", - ) parser.add_argument( "--history-turns", @@ -252,10 +252,10 @@ def parse_args() -> argparse.Namespace: ) parser.add_argument( - "--verbose", - type=bool, - default=get_env_value("VERBOSE", False, bool), - help="Verbose debug output(default: from env or false)", + "--auto-scan-at-startup", + action="store_true", + default=False, + help="Enable automatic scanning when the program starts", ) args = parser.parse_args()