-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Setup log rotation for runtime env agent #50877
base: master
Are you sure you want to change the base?
[core] Setup log rotation for runtime env agent #50877
Conversation
Signed-off-by: dentiny <dentinyhao@gmail.com>
e10a3b5
to
993da3c
Compare
Signed-off-by: dentiny <dentinyhao@gmail.com>
Signed-off-by: dentiny <dentinyhao@gmail.com>
@@ -97,18 +99,16 @@ def open_capture_files(log_dir): | |||
"--logging-rotate-bytes", | |||
required=False, | |||
type=int, | |||
default=ray_constants.LOGGING_ROTATE_BYTES, | |||
default=sys.maxsize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior here is tricky, we have two types of files here: runtime_agent.out and runtime_agent.log.
In terms of current behavior, default rotation size for out
file is sys.maxsize
;
while default value for log
file is ray_constants.LOGGING_ROTATE_BYTES
.
python/ray/_raylet.pyx
Outdated
RedirectStderr(opt) | ||
|
||
@staticmethod | ||
def redirect_stdout(const c_string &file_path, uint64_t rotation_max_size, uint64_t rotation_max_file_count, c_bool tee_to_stdout, c_bool tee_to_stderr): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference between this and the previous redirect_stdout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No difference.. I'm really surprised it could compile
Signed-off-by: dentiny <dentinyhao@gmail.com>
As titled, use pipe-based redirection to setup log rotation for runtime env agent.