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

Flask print output not showing in log file when managed by Supervisor #1676

Open
Dovelet1 opened this issue Jan 18, 2025 · 0 comments
Open

Comments

@Dovelet1
Copy link

Hello everyone!
Environment:
Docker
Supervisor managing multiple Flask services

Description: I’m running multiple Flask services inside a Docker container and using Supervisor to manage them. I have configured Supervisor to capture the standard output (stdout) and error output (stderr) by specifying log file paths in the Supervisor configuration, like this:

[program:flaskapp]
command=python /path/to/your/app.py
directory=/path/to/your/app
autostart=true
autorestart=true
stderr_logfile=/var/log/flaskapp.err.log
stdout_logfile=/var/log/flaskapp.out.log

However, I’ve noticed that the print statements within the Flask application are not showing up in the log file /var/log/flaskapp.out.log. I expected the content from print to be captured in the log file, but it doesn't appear there.

Is there any additional configuration required to ensure that print statements show up in the log files?

Any help or insights would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant