Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Set local logging level via env variable (vllm-project#2774)
Browse files Browse the repository at this point in the history
  • Loading branch information
gardberg authored and alexm-neuralmagic committed Feb 13, 2024
1 parent 520d761 commit 7a928ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""Logging configuration for vLLM."""
import logging
import sys
import os

_FORMAT = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s"
_DATE_FORMAT = "%m-%d %H:%M:%S"
Expand Down Expand Up @@ -50,7 +51,7 @@ def _setup_logger():
def init_logger(name: str):
# Use the same settings as above for root logger
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
logger.setLevel(os.getenv("LOG_LEVEL", "DEBUG"))
logger.addHandler(_default_handler)
logger.propagate = False
return logger

0 comments on commit 7a928ea

Please sign in to comment.