reflex
reflex copied to clipboard
Loglevel doesn't work in prod mode
Describe the bug Debug logs don't work in prod mode.
To Reproduce
pc run --loglevel debug --env prod
Expected behavior I should see the debug logs, but I don't.
Screenshots If applicable, add screenshots to help explain your problem.
** Specifics (please complete the following information):**
- Python Version: 3.11
- Pynecone Version: 0.1.12
- OS: Mac
- Browser (Optional):
Additional context Add any other context about the problem here.
I am new to the project and I may be wrong but it seems like the RUN_BACKEND_PROD constant already have a "log-level" argument. Thus two arguments with the same keyword is given to the subprocess and it probably selects the first one.
If this is the case, I can open a PR to solve it.
I am new to the project and I may be wrong but it seems like the RUN_BACKEND_PROD constant already have a "log-level" argument. Thus two arguments with the same keyword is given to the subprocess and it probably selects the first one.
If this is the case, I can open a PR to solve it.
Hi yes this would be great! It may be a little tricky because the gunicorn subprocesses need their log levels need to be suppressed. But if you can get the log levels working for prod that would be awesome. Let me know if this doesn't make sense I can explain more.
It would be better if you can explain more. I don't understand what you mean by their log levels need to be suppressed(I don't know about gunicorn too unfortunately)
Edit
What about something like this:
and in run_backend_prod function: