forked from phoenix-oss/llama-stack-mirror
chore: Remove style tags from log formatter (#1808)
# What does this PR do? Set a formatter for log file handler that does not pollute log messages with color tags. ## Test Plan Successfully tested with `LLAMA_STACK_LOG_FILE=server.log llama stack run ...`
This commit is contained in:
parent
e3578b1c1b
commit
9d9ab7e7dd
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ def setup_logging(category_levels: Dict[str, int], log_file: str | None) -> None
|
|||
category_levels (Dict[str, int]): A dictionary mapping categories to their log levels.
|
||||
log_file (str): Path to a log file to additionally pipe the logs into
|
||||
"""
|
||||
log_format = "[dim]%(asctime)s %(name)s:%(lineno)d[/] [yellow dim]%(category)s[/]: %(message)s"
|
||||
log_format = "%(asctime)s %(name)s:%(lineno)d %(category)s: %(message)s"
|
||||
|
||||
class CategoryFilter(logging.Filter):
|
||||
"""Ensure category is always present in log records."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue