Black Lives Matter. Please consider donating to Black Girls Code today.

I can't see my prints when launching my app with gunicorn

Hi.

I have several prints to log what’s going on in my app.
I can see the prints when I’m running it directly with python. However, if I launch the app using gunicorn, I only get some very first prints until some point and then I don’t get anything else but warnings or errors.

Let me explain it better with code:
The code of my app is here: https://github.com/Grasia/WikiChron/blob/master/app.py
So, I see the four prints which goes from line 196 to line 199, but I can’ see the print in number 222. Nonetheless, I can see this last print if I launch the app with python app.py or if I replace print by warn.

This is my gunicorn command:
$(gunicorn app:server -b :80 -t 600 --name=WikiChron)

Sadly, I’m still having this issue.
Now, I don’t see any prints when I launch the app with gunicorn. In other words, all I get in the screen output is messages from flask and gunicorn, like:

[2018-05-25 13:15:43 +0200] [27364] [INFO] Starting gunicorn 19.7.1
[2018-05-25 13:15:43 +0200] [27364] [DEBUG] Arbiter booted
[2018-05-25 13:15:43 +0200] [27364] [INFO] Listening at: http://0.0.0.0:80 (27364)
[2018-05-25 13:15:43 +0200] [27364] [INFO] Using worker: sync
[2018-05-25 13:15:43 +0200] [27367] [INFO] Booting worker with pid: 27367

and:

[2018-05-25 13:15:51 +0200] [27367] [DEBUG] GET /_dash-component-suites/dash_core_components/bundle.js
[2018-05-25 13:15:51 +0200] [27367] [DEBUG] GET /_dash-component-suites/dash_renderer/bundle.js
[2018-05-25 13:15:52 +0200] [27367] [DEBUG] GET /_dash-layout
[2018-05-25 13:15:52 +0200] [27367] [DEBUG] GET /_dash-dependencies
[2018-05-25 13:15:52 +0200] [27367] [DEBUG] GET /favicon.ico

And explicit warn.warnings from my code. like:

/root/workspace/WikiChron/app.py:174: UserWarning:
There is no selection of wikis & metrics yet

If have set the flags --error-logfile "-" --enable-stdio-inheritance --log-level "debug" -as shown here- with no luck.
`

But I can’t see any prints. Might anyone confirm if he/she has the same behaviour for Python prints with gunicorn, please??

Fixed!
The problem was in my side and had nothing to do with gunicorn.
I was using a shell script to deploy the app that had written: $(gunicorn app:server), and it was consuming all the stdout output. I’ve changed it to just (gunicorn app:server) and now works!