Page 1 of 1

Add option to set loglevels on Scheduled item

Posted: Saturday 15 May 2021 11:48
by keros
Hello,

In running DomoticZ on latest stable 2021.1. Since this version, we have the opportunity to set the loglevel par hardware device. This is awesome.

I use dummy devices with a planning and each time the device change, I have a line in the log :

Code: Select all

2021-05-15 11:31:01.596 Status: Schedule item started! Name: Horloge A, Type: On Time, DevID: 1, Time: 2021-05-15 11:31:01
I disabled all the log (info, status et error) for the corresponding Dummy hardware, but I still have the status line.

I tried on a new DomoticZ installation (with beta last update Domoticz V2021.1 build 13256).

This is my configuration :
  • 2 dummy hardwares : Dummy A with all loglevel set ON and Dummy B with all loglevel set OFF.
  • 2 virtual devices Horloge A crated from Dummy A and Horloge B crated from Dummy B with exactly the same planing
.

I expected not to have any log for Horloge B. This is what I got :
Sans titre.png
Sans titre.png (127.13 KiB) Viewed 717 times
The info log of Horloge B is not showed, that's good, but I still got the status log for Horloge B.

Is it a bug or is there a configuration to turn it off ?

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 12:04
by waaren
keros wrote: Saturday 15 May 2021 11:48 The info log of Horloge B is not showed, that's good, but I still got the status log for Horloge B.
The Status Schedule message you see does not come from the Hardware but from the Scheduler. You cannot prevent individual status messages from this domoticz subsystem but you can prevent all status messages to the log by modifying /etc/init.d/domoticz.sh by editing this file

Change line

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -loglevel  normal,status,error"
to

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS -loglevel  error" 
This will prevent status or normal messages to show up in the domoticz log.

and do

Code: Select all

sudo systemctl daemon-reload
sudo service domoticz restart

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 14:49
by keros
Thank you very much Waaren for the reply and the explanations.

I just wanted to turn off the status log on the scheduled device. For that I moved them to a specific hardware.
I can't turn off the statud log in /etc/init.d/domoticz.sh otherwise I won't have the status log for the other devices and scripts.

The log line indicates Status. I hopped it could be disable with the new function.
Do you think if this could be an issue oppened on GitHub ?

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 15:45
by waaren
keros wrote: Saturday 15 May 2021 14:49 Do you think if this could be an issue oppened on GitHub ?
No. It is not is a code bug or similar issue.

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 17:34
by keros
Ok, so no improvement possible :(

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 21:13
by waaren
keros wrote: Saturday 15 May 2021 17:34 Ok, so no improvement possible :(
That is not what I wrote. If you have a suggestion for a modification you should post it in the suggestion subforum If a developer agree that it would be an improvement and is willing to spend time on it, she / he might pick it up and work on it.

The domoticz github issue list is meant for domoticz code bugs only

Re: Set loglevel on Schedule item doesn't work

Posted: Saturday 15 May 2021 21:22
by keros
Sorry for my misunderstanding. I was right to demand on the forum instead of asking directly in the domoticz github issue :)

Do I create a new post or a moderator can move this topic in the suggestion forum ?

Thanks
[EDIT (waaren)] moved to suggestions and changed topic subject

Re: Add option to set loglevels on Scheduled item

Posted: Sunday 16 May 2021 15:43
by keros
Thank you Waaren.