Repository navigation
Conversation
…logs next to general.log
…r take a log_file next to general.log, replacing the workflow's own handler remove: CONSUMER_LOG_MAX_BYTES and CONSUMER_LOG_BACKUP_COUNT — consumer logs now share LogManager's rotation
There was a problem hiding this comment.
I pushed b37978c. The consumer logs now use the existing LogMixin and LogManager instead of a separate handler in workflow.py. set_log_manager() and get_logger() take an optional log_file, which writes next to general.log with the same rotation and format. The CONSUMER_LOG_* settings are removed, so consumer logs use the shared 10 MB x 10 rotation.
Requesting changes for two things.
-
The associator log fills up fast, especially with more than one consumer. Most of it is the pvapy stats block printed every report period. With 2 consumers it wrote 5.3 MB in about 70 minutes, so all the rotation files would fill in 12 to 24 hours. One option is a boolean
COMPACTinsettings.py. When True, each stats block is written as one short line, and tracebacks, errors and the start and exit lines are still written in full. When False, everything is written as it is now. -
A normal Stop loses the last output and the exit code.
stop()sets_running = False, sorun()stops reading right after the signal is sent. The fix is to keep reading inrun()until the output ends, thenwait()and log the exit code, and havestop()only send the signal.
Smaller notes: the branch is 6 commits behind main, blank lines get logged as empty timestamp lines, and two Workflows on the same machine write to the same consumer_associator.log, which rotation does not handle well.
|
@pecomyint could you check out |
Summary
consumer_<name>.log(rotating, next togeneral.log) with the start command and anexited with code Nline.Test plan
pytest tests/unitpasses;ruff check src/dashpva/cleantest_workflow_consumer_logs.pylogs/consumer_*.log🤖 Generated with Claude Code