vllm.logger
¶
Logging configuration for vLLM.
Functions:
-
configure_logging–Apply a logging configuration in the current process.
-
configure_logging_from_args–Apply parsed logging arguments and retain them for child processes.
-
configure_logging_if_needed–Apply a logging configuration unless it is already active in this process.
-
enable_trace_function_call–Enable tracing of every function call in code under
root_dir. -
init_logger–Retrieve a logger and add vLLM's convenience logging methods.
-
set_vllm_process_name–Set the vLLM process name added to subsequent log records.
_VllmLogRecordFactory
¶
Add vLLM process metadata while preserving the wrapped record factory.
Source code in vllm/logger.py
_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.
Methods:
-
debug_once–As
debug, but subsequent calls with -
error_once–As
error, but subsequent calls with -
info_once–As
info, but subsequent calls with -
warning_once–As
warning, but subsequent calls with
Source code in vllm/logger.py
debug_once(msg, *args, scope='local')
¶
As debug, but subsequent calls with
the same message are silently dropped.
Source code in vllm/logger.py
error_once(msg, *args, scope='local')
¶
As error, but subsequent calls with
the same message are silently dropped.
Source code in vllm/logger.py
info_once(msg, *args, scope='local')
¶
As info, but subsequent calls with
the same message are silently dropped.
Source code in vllm/logger.py
_configure_vllm_root_logger(config=None)
¶
Configure logging from explicit config or bootstrap environment values.
Source code in vllm/logger.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
_log_platform_warnings(config)
¶
Emit platform diagnostics only after an enabled config is active.
Source code in vllm/logger.py
_should_log_with_scope(scope)
¶
Decide whether to log based on scope.
Source code in vllm/logger.py
configure_logging(config)
¶
Apply a logging configuration in the current process.
Source code in vllm/logger.py
configure_logging_from_args(args)
¶
Apply parsed logging arguments and retain them for child processes.
Source code in vllm/logger.py
configure_logging_if_needed(config)
¶
Apply a logging configuration unless it is already active in this process.
enable_trace_function_call(log_file_path, root_dir=None)
¶
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)
¶
Retrieve a logger and add vLLM's convenience logging methods.
Source code in vllm/logger.py
set_vllm_process_name(process_name, *, skip_if_set=False)
¶
Set the vLLM process name added to subsequent log records.