Skip to content

Conversation

@kirito201922
Copy link

@kirito201922 kirito201922 commented Dec 26, 2025

Adds optional file logging support to get_logger based on the POLYMARKET_LOG_FILE environment variable. When set, logs are written both to stdout and to the specified file.


Note

Enables file-based logging alongside existing stdout logging in get_logger.

  • When POLYMARKET_LOG_FILE is set, adds a FileHandler with the same formatter, in addition to the StreamHandler
  • Renames handler to stream_handler for clarity; otherwise preserves logging level, formatter, and early-return behavior

Written by Cursor Bugbot for commit a800d40. This will update automatically on new commits. Configure here.

Adds optional file logging support to get_logger based on the POLYMARKET_LOG_FILE environment variable. When set, logs are written both to stdout and to the specified file.
+ file_handler.setFormatter(formatter)
+ logger.addHandler(file_handler)
@@
return logger
Copy link

Choose a reason for hiding this comment

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

Diff markers committed as actual Python source code

The file agents/logging_utils.py contains raw diff/patch output instead of valid Python code. The file includes diff markers like @@, lines prefixed with - (removed lines), and lines prefixed with + (added lines). This is not valid Python syntax and will cause a SyntaxError when imported. It appears a diff/patch file was accidentally committed instead of the actual implementation.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant