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)
Possibility to log warnings (dzVents)
Moderators: leecollings, remb0
-
- Posts: 2
- Joined: Tuesday 21 March 2023 11:43
- Target OS: Linux
- Domoticz version: beta
- Location: Germany
- Contact:
Possibility to log warnings (dzVents)
- Attachments
-
- Screenshot-2.png (35.29 KiB) Viewed 1086 times
-
- Screenshot-1.png (19.63 KiB) Viewed 1086 times
Intel NUC with Proxmox with Debian with Domoticz
-
- Posts: 536
- Joined: Monday 20 March 2023 14:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Somewhere in NL
- Contact:
Re: Possibility to log warnings (dzVents)
I like that, great idea.
Logic will get you from A to B. Imagination will take you everywhere.
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Possibility to log warnings (dzVents)
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.
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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 2
- Joined: Tuesday 21 March 2023 11:43
- Target OS: Linux
- Domoticz version: beta
- Location: Germany
- Contact:
Re: Possibility to log warnings (dzVents)
@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.
@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.
Intel NUC with Proxmox with Debian with Domoticz
-
- Posts: 73
- Joined: Wednesday 13 February 2019 18:09
- Target OS: Windows
- Domoticz version: 2023.1
- Location: Netherlands
- Contact:
Re: Possibility to log warnings (dzVents)
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.)
- Running LMS, Domoticz and Dashticz on a windows 11 laptop.
- LMS (11 players) / Hue (26 lights, 2 switches) / Z-wave (14 devices) / Toon (unrooted) / Chromecast
- LMS (11 players) / Hue (26 lights, 2 switches) / Z-wave (14 devices) / Toon (unrooted) / Chromecast
-
- Posts: 504
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Possibility to log warnings (dzVents)
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.
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.
Bugs bug me.
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Possibility to log warnings (dzVents)
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.
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.
-
- Posts: 504
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Who is online
Users browsing this forum: Google [Bot] and 0 guests