How to limit logging? + Where are the logs anyway?

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
Marque1968
Posts: 60
Joined: Tuesday 03 April 2018 18:41
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

How to limit logging? + Where are the logs anyway?

Post by Marque1968 »

I have a few logging questions. Mainly, how can I limit logging. The P1 (main energy) meter logs every 10 seconds the energy used, and it shows up in the log with 7 log lines. Also the Aeontec stick is shown delivering energy use a couple of times per minute. This fills the log file that quickly, that if I don't look straight away, I can not find log-results and errors from my scripts. So how can I stop the P1 meter and others to log each time they recieve data, without limiting other logging. These devices are also still welcome to log errors.

And to as a result also a follow up question. I can't imagine the real log being this limited (currently 6 minutes worth of data, when nothing else is being executed). I assume the log in the Domoticz program is a -tail. So where can I find the original log file (latest beta on Pi)

Thanks.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: How to limit logging? + Where are the logs anyway?

Post by waaren »

Marque1968 wrote: Tuesday 14 May 2019 22:49 I can't imagine the real log being this limited (currently 6 minutes worth of data, when nothing else is being executed). I assume the log in the Domoticz program is a -tail. So where can I find the original log file (latest beta on Pi)
Have a look at /etc/init.d/domoticz.sh. You will find something like

Code: Select all

DAEMON=/opt/domoticz/$NAME
DAEMON_ARGS="-daemon"
DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8084"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error"
edit this file to your liking and stop / start domoticz. You can find the possible (log)options if you enter

Code: Select all

./domoticz --help 
from the domoticz dir on the CLI
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: How to limit logging? + Where are the logs anyway?

Post by Dnpwwo »

I think this is really the wrong question.

Rather than limiting the logging we should ask "Can there be a 'Developer' setting on the Log page that does not limit what is shown?"

Previously the Log page used to buffer log details in chronological order (it doesn't anymore :?) for the duration the page was open which was extremely useful for troubleshooting. Having the option to e-enabling that on demand would be awesome.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest