vllm.logger ¶
Logging configuration for vLLM.
_VllmLogger ¶
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
debug_once ¶
As debug, but subsequent calls with the same message are silently dropped.
Source code in vllm/logger.py
info_once ¶
As info, but subsequent calls with the same message are silently dropped.
Source code in vllm/logger.py
_should_log_with_scope ¶
_should_log_with_scope(scope: LogScope) -> bool
Decide whether to log based on scope
Source code in vllm/logger.py
enable_trace_function_call ¶
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 ¶
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.