Change loglevel for WebServer Topic is solved

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jgaalen
Posts: 15
Joined: Monday 11 February 2019 9:05
Target OS: Linux
Domoticz version:
Contact:

Change loglevel for WebServer

Post by jgaalen »

Hi,

Does anyone knows how to change the loglevel of specifically the WebServer component? My logs are swamped with lines like:
2021-02-23 08:41:54.172 Status: Incoming connection from: 192.168.4.192
2021-02-23 08:41:54.174 Status: Incoming connection from: 192.168.4.192
2021-02-23 08:41:54.176 Status: Incoming connection from: 192.168.4.192
2021-02-23 08:41:54.504 Status: Incoming connection from: 192.168.4.66
2021-02-23 08:41:54.513 Status: Incoming connection from: 192.168.4.66
2021-02-23 08:41:54.522 Status: Incoming connection from: 192.168.4.66
2021-02-23 08:41:55.127 Status: Incoming connection from: 192.168.4.192
2021-02-23 08:41:55.129 Status: Incoming connection from: 192.168.4.192

But I cannot find a way to specifically reduce these logs. They have the log level log_status. Thanks
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Change loglevel for WebServer

Post by waaren »

jgaalen wrote: Tuesday 23 February 2021 8:43 Does anyone knows how to change the loglevel of specifically the WebServer component? My logs are swamped with lines like:
It's not possible without modifying the source and compile locally
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
jgaalen
Posts: 15
Joined: Monday 11 February 2019 9:05
Target OS: Linux
Domoticz version:
Contact:

Re: Change loglevel for WebServer

Post by jgaalen »

And how to change the loglevel to ignore 'log_status' lines?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Change loglevel for WebServer

Post by waaren »

jgaalen wrote: Tuesday 23 February 2021 10:35 And how to change the loglevel to ignore 'log_status' lines?
You can set the loglevel in /etc/init.d/domoticz.sh

The domoticz logfile location and other settings are defined in /etc/init.d/domoticz.sh
the relevant settings are in set to the DAEMON_ARGS var.

with an editor of choice

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log" # or any other OS file
#DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error, debug" # debug disabled for now
#DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error" # these loglevels will make it to the logfile
DAEMON_ARGS="$DAEMON_ARGS -loglevel error" # Only errors 
#DAEMON_ARGS="$DAEMON_ARGS -debuglevel normal,hardware,received,webserver,eventsystem,python,thread_id"

Code: Select all

sudo systemctl daemon-reload
sudo service domoticz stop
sudo service domoticz start
sudo tail -f  /var/log/domoticz.log
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest