@@ -39,8 +39,8 @@ def _substitute_process_id(path: str) -> str:
3939
4040
4141# Read environment variables once at module load time
42- _API_LOG_LEVEL = int (os .environ .get ("FLASHINFER_APILEVEL " , "0" ))
43- _API_LOG_DEST = _substitute_process_id (os .environ .get ("FLASHINFER_APIDEST " , "stdout" ))
42+ _API_LOG_LEVEL = int (os .environ .get ("FLASHINFER_LOGLEVEL " , "0" ))
43+ _API_LOG_DEST = _substitute_process_id (os .environ .get ("FLASHINFER_LOGDEST " , "stdout" ))
4444
4545# Create logger using Python's logging library
4646_logger = logging .getLogger ("flashinfer.api" )
@@ -54,7 +54,7 @@ def _setup_logger():
5454 _logger .setLevel (logging .CRITICAL + 1 ) # Higher than any level
5555 return
5656
57- # All enabled levels use loggging.DEBUG; verbosity is controlled by FLASHINFER_APILEVEL instead
57+ # All enabled levels use loggging.DEBUG; verbosity is controlled by FLASHINFER_LOGLEVEL instead
5858 _logger .setLevel (logging .DEBUG )
5959
6060 # Remove any existing handlers
@@ -466,17 +466,17 @@ def flashinfer_api(func: Callable = None) -> Callable:
466466 Decorator to log FlashInfer API calls using Python's logging library.
467467
468468 This decorator integrates with Python's standard logging infrastructure while
469- maintaining zero overhead when disabled (FLASHINFER_APILEVEL =0).
469+ maintaining zero overhead when disabled (FLASHINFER_LOGLEVEL =0).
470470
471471 Environment Variables
472472 ---------------------
473- FLASHINFER_APILEVEL : int (default: 0)
473+ FLASHINFER_LOGLEVEL : int (default: 0)
474474 - 0: No logging (zero overhead - decorator returns original function)
475475 - 1: Log function name only (logged BEFORE execution - crash-safe)
476476 - 3: Log function name + inputs/outputs with metadata (inputs logged BEFORE execution - crash-safe)
477477 - 5: Log function name + inputs/outputs with metadata + tensor statistics (inputs logged BEFORE execution - crash-safe)
478478
479- FLASHINFER_APIDEST : str (default: "stdout")
479+ FLASHINFER_LOGDEST : str (default: "stdout")
480480 - "stdout": Log to standard output
481481 - "stderr": Log to standard error
482482 - <path>: Log to specified file path
@@ -494,7 +494,7 @@ def flashinfer_api(func: Callable = None) -> Callable:
494494 -----
495495 - Key header lines include a timestamp in the format: [YYYY-MM-DD HH:MM:SS]
496496 (e.g., "FlashInfer API Call: function_name", "FlashInfer API Logging - System Information")
497- - When FLASHINFER_APILEVEL =0, the decorator has truly zero overhead
497+ - When FLASHINFER_LOGLEVEL =0, the decorator has truly zero overhead
498498 as it returns the original function unchanged.
499499 - Function names and inputs are logged BEFORE execution:
500500 - Level 1: Function name only
0 commit comments