Skip to content
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] Use rotation log file for application logging #49544

Closed
wants to merge 1 commit into from

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Jan 2, 2025

A followup for oversized logging file. It supports rotated logging file via overriding stdout and stderr with logging module.

I already tried the existing StreamToLogger module here:

sys.stdout = StreamToLogger(logger, logging.INFO, sys.stdout)
, which doesn't work (gets blocked forever)

@dentiny dentiny added the go add ONLY when ready to merge, run all tests label Jan 2, 2025
@dentiny dentiny requested review from jjyao and rynewang January 2, 2025 20:10
@dentiny dentiny force-pushed the hjiang/stream-to-logging branch from 678f21a to ef0728b Compare January 2, 2025 20:11
Signed-off-by: dentiny <[email protected]>
@dentiny dentiny force-pushed the hjiang/stream-to-logging branch from ef0728b to 9436e61 Compare January 2, 2025 20:12
)
configure_log_file(out_file, err_file)
sys.stdout = out_file
Copy link
Collaborator

Choose a reason for hiding this comment

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

This won't work if user's actor/task calls c++ code and in c++ there is std::cout << "xxxx"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

redo in #49548

@dentiny dentiny closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants