Logging configuration for vLLM.
 module-attribute  ¶
 DEFAULT_LOGGING_CONFIG = {
    "formatters": {
        "vllm": {
            "class": "vllm.logging_utils.NewLineFormatter",
            "datefmt": _DATE_FORMAT,
            "format": _FORMAT,
        }
    },
    "handlers": {
        "vllm": {
            "class": "logging.StreamHandler",
            "formatter": "vllm",
            "level": VLLM_LOGGING_LEVEL,
            "stream": VLLM_LOGGING_STREAM,
        }
    },
    "loggers": {
        "vllm": {
            "handlers": ["vllm"],
            "level": "DEBUG",
            "propagate": False,
        }
    },
    "version": 1,
    "disable_existing_loggers": False,
}
 module-attribute  ¶
 _FORMAT = f"{VLLM_LOGGING_PREFIX}%(levelname)s %(asctime)s [%(fileinfo)s:%(lineno)d] %(message)s"
 module-attribute  ¶
 _METHODS_TO_PATCH = {
    "debug_once": debug_once,
    "info_once": info_once,
    "warning_once": warning_once,
}
 
  Bases: Logger
Note
This class is just to provide type information. We actually patch the methods directly on the logging.Logger instance to avoid conflicting with other libraries such as intel_extension_for_pytorch.utils._logger.
Source code in vllm/logger.py
  
  As debug, but subsequent calls with the same message are silently dropped.
Source code in vllm/logger.py
  
  As info, but subsequent calls with the same message are silently dropped.
Source code in vllm/logger.py
  
  Source code in vllm/logger.py
  cached  ¶
    cached  ¶
    cached  ¶
    
  Decide whether to log based on scope
Source code in vllm/logger.py
  
  Source code in vllm/logger.py
  
  Enable tracing of every function call in code under root_dir. This is useful for debugging hangs or crashes. log_file_path is the path to the log file. root_dir is the root directory of the code to trace. If None, it is the vllm root directory.
Note that this call is thread-level, any threads calling this function will have the trace enabled. Other threads will not be affected.
Source code in vllm/logger.py
  
 init_logger(name: str) -> _VllmLogger
The main purpose of this function is to ensure that loggers are retrieved in such a way that we can be sure the root vllm logger has already been configured.