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

Logging supervisor's child process logs #588

Merged
merged 3 commits into from
Mar 2, 2025

Conversation

donny-wong
Copy link
Contributor

@donny-wong donny-wong commented Feb 24, 2025

Description:

We want to have logging for supervisor's child process logs for both stderr and stdout. These logs will be stored under the folder supervisor_child_log. I have set the log file rotation to a file size of 1MB with 10 backups. e.g.:

stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10

Here is a screenshot of how it looks like on my local server's workspace docker volume in regards to the generated log files:
Screenshot 2025-02-24 at 12 52 48 PM

@donny-wong donny-wong added this to the v2.6.1 milestone Feb 24, 2025
@donny-wong donny-wong marked this pull request as draft February 24, 2025 05:41
Copy link
Contributor

@david-yz-liu david-yz-liu left a comment

Choose a reason for hiding this comment

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

@donny-wong you're on the right track, but you need to make this a configurable option rather than a hard-coded path.

In development, you should store this in the server's workspace docker volume. This means the log files won't appear locally, but they will appear inside the docker container.

@donny-wong
Copy link
Contributor Author

@donny-wong you're on the right track, but you need to make this a configurable option rather than a hard-coded path.

In development, you should store this in the server's workspace docker volume. This means the log files won't appear locally, but they will appear inside the docker container.

Thank you @david-yz-liu, will do.

@donny-wong donny-wong marked this pull request as ready for review February 24, 2025 17:55
Copy link
Contributor

@david-yz-liu david-yz-liu left a comment

Choose a reason for hiding this comment

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

Hi @donny-wong, okay this is good. Two overall comments:

  1. When adding a new setting, it should also be documented in the README
  2. Please change the name "supervisor child log" to the more precise worker_log_dir. This makes it clear that these are logs for the workers (the name we use elsewhere in the application), and that it is a directory rather than a single file.

@david-yz-liu david-yz-liu merged commit 0cb0d52 into MarkUsProject:master Mar 2, 2025
7 checks passed
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.

2 participants