reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Loglevel doesn't work in prod mode

Open picklelo opened this issue 2 years ago β€’ 3 comments

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.

picklelo avatar Jan 14 '23 05:01 picklelo

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.

image

If this is the case, I can open a PR to solve it.

erkamkavak avatar Jan 20 '23 15:01 erkamkavak

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.

image

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.

Alek99 avatar Jan 21 '23 05:01 Alek99

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: image and in run_backend_prod function: image

erkamkavak avatar Jan 21 '23 09:01 erkamkavak