Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Printing worker logs #43

Closed
multimeric opened this issue Jan 6, 2021 · 2 comments
Closed

Printing worker logs #43

multimeric opened this issue Jan 6, 2021 · 2 comments

Comments

@multimeric
Copy link

If I add a worker-level gunicorn hook to my gunicorn_conf.py, for example:

accesslog = '-'
loglevel = 'debug'
errorlog = '-'
capture_output = True

def post_request(worker, req, environ, resp):
    worker.log.info(req)
    worker.log.info(environ)
    worker.log.info(resp)

These logs never show up in the docker logs. I know this config file is being correctly loaded, however, as it prints out my custom config on startup. How can I get these logs to go the stdout and thus the docker logs?

@multimeric
Copy link
Author

Update: this seems to be a fault in the meinheld worker, which is something I believe should be documented for these docker images as well. For more info refer to my issue here: mopemope/meinheld#118

@odovad
Copy link

odovad commented Feb 25, 2021

Hi, same issue I think? I only see logs in case of an error.

If everything works well, I only see :

[2021-02-25 10:58:58 +0000] [7] [INFO] Booting worker with pid: 7
[2021-02-25 10:58:58 +0000] [8] [INFO] Booting worker with pid: 8
[2021-02-25 10:58:58 +0000] [9] [INFO] Booting worker with pid: 9

Repository owner locked and limited conversation to collaborators Sep 8, 2024
@tiangolo tiangolo converted this issue into discussion #160 Sep 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants