simojenki / bonob

sonos SMAPI implementation allowing integrating different music sources with sonos.
GNU General Public License v3.0
226 stars 16 forks source link

Log file growing large #129

Closed billraff closed 1 year ago

billraff commented 1 year ago

I’m running bonob in a docker container on my NAS. After setting up yesterday I have close to 8000 log entries most of which are -

ffff:127.0.0.1 - - [19/Jan/2023:05:11:33 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21" | stdout

What are these and can I stop them from logging? I set LOG_LEVEL to ERROR but still seeing them.

billraff commented 1 year ago

Still hoping someone can help with stopping the log bloat I am seeing. Is anyone else seeing these requests every 30 seconds?

::ffff:127.0.0.1 - - [20/Jan/2023:12:37:04 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:37:34 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:38:04 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:38:34 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:39:05 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:39:35 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"
::ffff:127.0.0.1 - - [20/Jan/2023:12:40:06 +0000] "GET /about HTTP/1.1" 200 38 "-" "Wget/1.21"

My environment is set as -

"Env": [ "Logging_Level=error", "BNB_URL=http://192.168.87.137:3000", "BNB_SUBSONIC_URL=http://192.168.87.137:4533", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "NODE_VERSION=16.14.2", "YARN_VERSION=1.22.18", "BNB_PORT=3000", "DEBIAN_FRONTEND=noninteractive", "TZ=AMERICA/CHICAGO", "BNB_SONOS_SEED_HOST=192.168.87.233", "BNB_SONOS_AUTO_REGISTER=true", "BNB_SONOS_DEVICE_DISCOVERY=true" ],

So I tried to set as 'ERROR' or 'error' (hoping case would fix it) but I still see these info WGET requests every 30s. Anyone else? These aren't errors so not sure why they are being logged.

simojenki commented 1 year ago

Those logs entries are the docker daemon running a health check against the container.

There is currently no way to turn them off.

Your docker host will be responsible for rolling its' logs so whilst it is perhaps annoying, it shouldn't cause a problem.

billraff commented 1 year ago

Thanks for the reply. I kind of figured that’s what was happening. My docker host is my Synology NAS which has its own way of logging them to a database. So not the ordinary docker logs to json. Would it be possible to set a time period environmental variable so a person could say check every 15 minutes? I’ll keep searching for ways to ‘roll’ the log on Synology. Thanks for a great utility!

simojenki commented 1 year ago

I've changed this so that by default it will not log these http requests, this should fix your issue

billraff commented 1 year ago

Excellent! Thanks.

billraff commented 1 year ago

I installed 0.6.4 this morning and still see the GET requests. Is there a setting I need to enable?

simojenki commented 1 year ago

Sorry, it's still building, will be released as 0.6.5 today

billraff commented 1 year ago

0.6.5 resolves this issue. Thanks.