Page 1 of 1
Possibility to log warnings (dzVents)
Posted: Tuesday 21 March 2023 12:07
by ml17950
Hi.
In my dzVents-scripts I use logging to monitor events.
But there so many events (like: EventSystem: Script event triggered), I donn't care (mostly).
So, I use LOG_ERROR do log "my" events.
But then, I can't differentiate between "my loggings" and errors.
So, I added also warnings to the log-system (see attachments).
Maybe something for the beta-channel?
(git patch-file avaiable - but can't upload here)
Re: Possibility to log warnings (dzVents)
Posted: Tuesday 21 March 2023 13:38
by Kedi
I like that, great idea.
Re: Possibility to log warnings (dzVents)
Posted: Tuesday 21 March 2023 14:04
by waltervl
It would be nice to treat most DzVents logging as Info logging instead of status logging.
Then we could just use the standard Domoticz Info/Status/Error log levels and filters and no need to add a Warning log level.
All those "EventSystem: Script event triggered" log lines should be info logging instead of Status.
Re: Possibility to log warnings (dzVents)
Posted: Tuesday 21 March 2023 19:56
by ml17950
@Kedi: thanks
@waltervl Yes, but there so many more locations in the code to change - for example - status to internal, that a new loglevel was easier to implement.
Re: Possibility to log warnings (dzVents)
Posted: Thursday 08 February 2024 21:52
by stephanvdplas
In addition, I would opt for a LOG_NONE level, to suppress errors from some specific scripts (in my environment, a call to the Denon http API always gives an error (
http://192.168.x.y/goform/formiPhoneAppDirect.xml?MV495) when changing the volume.)
Re: Possibility to log warnings (dzVents)
Posted: Thursday 08 February 2024 23:21
by HvdW
Is there a way in dzvents to have a dump of the
logging messages?
In that way warnings could be filtered with a grep-like command en the text put in a TEXT sensor
Plus a notification can be sent.
@elzorrovega did some work on
extracting the log data.
On the other hand; who cares that a script gives errors. Let it be.
Re: Possibility to log warnings (dzVents)
Posted: Friday 09 February 2024 9:44
by willemd
You can specify in which file the logging should be stored. I store the logging on a usb mounted drive.
From there you can apply any command on it, like grep or tail.
You can then put the result on a text sensor, or send a notification for example.
Re: Possibility to log warnings (dzVents)
Posted: Friday 09 February 2024 11:34
by HvdW
willemd wrote: ↑Friday 09 February 2024 9:44
You can specify in which file the logging should be stored. I store the logging on a usb mounted drive.
From there you can apply any command on it, like grep or tail.
You can then put the result on a text sensor, or send a notification for example.
Nice solution