Conversation
e7e400f to
25fe4ee
Compare
Documents the new EnvLogConfig class and log field added to EnvConfig, which provides logging configuration for environment workers.
When logging is disabled (default), reset_logger() sets _LOGGER to None but setup_logger() was not called. This caused EventLoopLagMonitor to crash with RuntimeError when calling get_logger(). Fix: Always set up a logger in worker processes. When logging is disabled, use CRITICAL level which produces no output (critical logging is disabled in setup_logger).
The FileHandler added for the verifiers logger was missing a Formatter, causing log messages to be written as raw text without timestamps, log levels, or logger names. This makes the verifiers logs difficult to correlate or debug effectively. Added a Formatter with timestamp (HH:MM:SS) and log level formatting, matching the format used by the prime-rl logger for consistency.
On Linux with fork start method, worker subprocesses inherit _LOGGER
from parent. Both branches need reset_logger() before setup_logger()
to avoid RuntimeError("Logger already set").
This reverts commit f37ab4b.
| log_file: str | None, | ||
| ): | ||
| """Main entry point for worker process.""" | ||
| # Reset logger inherited from parent process, then setup fresh logger for this worker |
Member
There was a problem hiding this comment.
lol the logger singleton is shared across mp boundaries?
Contributor
Author
There was a problem hiding this comment.
actually would surprise me too
Contributor
Author
There was a problem hiding this comment.
but i needed reset_logger() for sure.
samsja
pushed a commit
that referenced
this pull request
Jan 13, 2026
samsja
pushed a commit
that referenced
this pull request
Jan 13, 2026
4 tasks
Jackmin801
pushed a commit
that referenced
this pull request
Jan 15, 2026
* add env worker logging
* reset logger before env logger
* redirect verifiers logger to file
* Add CHANGELOG entry for orchestrator.env.log configuration
Documents the new EnvLogConfig class and log field added to EnvConfig,
which provides logging configuration for environment workers.
* Fix worker crash when logging disabled
When logging is disabled (default), reset_logger() sets _LOGGER to None
but setup_logger() was not called. This caused EventLoopLagMonitor to
crash with RuntimeError when calling get_logger().
Fix: Always set up a logger in worker processes. When logging is disabled,
use CRITICAL level which produces no output (critical logging is disabled
in setup_logger).
* fix
* Add formatter to verifiers logger FileHandler
The FileHandler added for the verifiers logger was missing a Formatter,
causing log messages to be written as raw text without timestamps, log
levels, or logger names. This makes the verifiers logs difficult to
correlate or debug effectively.
Added a Formatter with timestamp (HH:MM:SS) and log level formatting,
matching the format used by the prime-rl logger for consistency.
* Add missing reset_logger() in else branch
On Linux with fork start method, worker subprocesses inherit _LOGGER
from parent. Both branches need reset_logger() before setup_logger()
to avoid RuntimeError("Logger already set").
* Revert "Fix worker crash when logging disabled"
This reverts commit f37ab4b.
* refactor
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enable in
orch.tomllike thiswrites to
run_0/env_workers/ENV_NAME/worker_X.logNote
Introduces optional, per-environment worker logging and routes both
prime-rlandverifierslogs to per-worker files.EnvLogConfigandorchestrator.env.logfield withlevelandvf_level; if unset, logging stays disabledSchedulernow receivesoutput_dir; createsget_env_worker_log_dir(output_dir, env_name)and passeslog_level,vf_log_level,log_filetoEnvWorkerverifiersto the same log file; accepts new logging argsget_env_worker_log_dirinutils/pathing.pyCHANGELOG.mdwithorchestrator.env.logentryWritten by Cursor Bugbot for commit 347d19c. This will update automatically on new commits. Configure here.