Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion reflex/utils/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import contextlib
import datetime
import inspect
import os
import shutil
Expand Down Expand Up @@ -136,7 +137,7 @@ def print_to_log_file(msg: str, *, dedupe: bool = False, **kwargs):
dedupe: If True, suppress multiple console logs of print message.
kwargs: Keyword arguments to pass to the print function.
"""
log_file_console().print(msg, **kwargs)
log_file_console().print(f"[{datetime.datetime.now()}] {msg}", **kwargs)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider using a more consistent timestamp format like ISO 8601 or match the existing timestamp format used in log_file_console() (lines 108-109) for consistency

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: datetime.datetime.now() uses local timezone. Consider using datetime.datetime.now(datetime.timezone.utc) for UTC timestamps to avoid timezone ambiguity in logs



def debug(msg: str, *, dedupe: bool = False, **kwargs):
Expand Down
Loading