dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on May 10, 2021 13:46:51 GMT -8
I get the following message in version 025
192.168.1.14 - - [10/May/2021 17:39:15] "POST /_dash-update-component HTTP/1.1" 204 - repeated ad infinitum via standard error in the shell when I run the dash_app. Do we know what generates those messages? Thanks, Dow
|
|
|
Post by doxidad on May 10, 2021 14:33:50 GMT -8
204 No Content Server received the request, but there is no information to send back
200 level errors are not really errors but informational. 400 & 500 level are bad.
Basically,the server did what it was supposed to do.
These would normally end up in the httpd-access.log file of a web server (apache, nginx, etc). You would never see these unless you were a web server administrator perusing the logs.
Since the dash_app (index.py) is the web server, these are going into your dash logs. I would imagine the way the scripts work within plotly and friends cause these.
|
|
|
Post by SDL on May 11, 2021 8:02:18 GMT -8
I've tried a couple of times to reduce the unnecessary logging information from plotly and have not been successful.
BP
|
|
|
Post by doxidad on May 11, 2021 8:37:15 GMT -8
My assumption is that auto updates cause these. The update happens but there is no change in the data so the 204 is generated instead of a 200 status.
|
|
brenna
New Member
Posts: 10
Raspberry Pi: Yes
|
Post by brenna on May 11, 2021 20:51:13 GMT -8
As doxidad mentioned, it's not actually an error, but if it's about reducing the log spam I've had some luck with this method from github.com/plotly/dash/issues/270. import logging
logging.getLogger('werkzeug').setLevel(logging.ERROR) This is set in dash_app/index.py just above app = dash.Dash(...)This cuts error logging down to only actual exceptions. If you still want to see non-http success codes this might not work for you. Using logging.WARNING was about the same output as logging.ERROR, or at least I didn't notice any difference just clicking through pages. Setting the level to logging.DEBUG was the default mode and shows all the request/response logs.
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on May 12, 2021 7:31:25 GMT -8
Brenna, Thank you! I'll try that change in logging level. Sound like exactly what I want as the default. This should reduce wear and tear on the SD card. Dow
|
|
|
Post by SDL on May 13, 2021 9:36:22 GMT -8
Brenna,
You ROCK! I'll add that in the base code to WeatherSense and SkyWeather2. Works like a champ.
BP
|
|