Page 1 of 1

Disable log for 1 device

Posted: Monday 30 January 2017 10:48
by ThaDuck
I have a P1 Smart Meter connected to my Domoticz. Works great, the newest smart meters even send their info every second. But that results in a log line every second, which is not needed (used DB space, keeps HDDs out of sleep, etc.) and pushing back real log entries.

Is there a way to disable logging for 1 device?

Re: Disable log for 1 device

Posted: Monday 30 January 2017 19:39
by SweetPants
As far as i know you can't

Re: Disable log for 1 device

Posted: Thursday 05 October 2017 14:27
by solidum90
I'm interested too..!

Re: Disable log for 1 device

Posted: Thursday 05 October 2017 14:46
by emme
+1

would be nice the possibility to limit to n-days also :P

Re: Disable log for 1 device

Posted: Sunday 14 July 2019 14:32
by Louk
Hi,

Since some weeks I'm using Domoticz on my Synology NAS as alternative for a bricked VERA (by connecting a powered USB hub, but that's a complete different story).

After a lot of struggling while configuring the setup, that includes an intelligent energy meter (P1), it run's quite smoothly. Except for one nasty issue: The Domoticz server stops or hangs at least once a week. After some investigation, I found that there was a HUGE log file, mostly filled with useless messages about receiving data from the P1 interface.

Now I want to disable this (useless) logging, for this device, all devices, or even all logging at once. I understand from this forum that the first option is not supported. I found a configuration file (/usr/local/domoticz/var/scripts/domoticz.conf. This file contains lines (commented out) to enable logging, selecting the log file, and options to log. However changing this file does not seem to make any difference.

I also found (guided by this forum :idea: ) the start script for the Domoticz service that contains the following line:

Code: Select all

    su ${USER} -c "${DOMOTICZ} -www ${PORT} -wwwroot ${WWWROOT} -sslwww ${RSSLPORT} -sslcert ${RSSLCERT} -approot ${INSTALL_DIR}/ -userdata ${INSTALL_DIR}/var/ -dbase ${DB_FILE} -log ${LOGFILE} & echo \$! > ${PID_FILE} "
Now I wonder what happens when I remove the log file spec, or even better, if I could add an option to include the config, so I can reduce the log file to error messages only?

PS.: I know this is a reply on an older post, but it's about the same issue (too much logging, caused by the P1 interface) and there is still no solution for this.

Re: Disable log for 1 device

Posted: Monday 15 July 2019 14:00
by gizmocuz
Why do you need to store a log file ?
This could only be useful while debugging, after just do not do this
There are command line options to specify to only log warnings/errors

Re: Disable log for 1 device

Posted: Wednesday 17 July 2019 2:56
by Louk
Normally I don't need log files at all, but because Domoticz crashes or just stops every 5 to 7 days, I want to see what is going on.

Where do I find these command line options to customize the logging options? Or how do I force Domoticz to use this option file (which isn't there for nothing, I suppose)?

Re: Disable log for 1 device

Posted: Wednesday 17 July 2019 6:47
by waaren
Louk wrote: Wednesday 17 July 2019 2:56 Where do I find these command line options to customize the logging options?
Please have a look at this crosspost :)