Page 1 of 1
Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:19
by plugge
I would like to suggest to make log lines about Status Script event triggered more intelligible by including the script name.
Currently, we get pretty useless log lines like this:
Code: Select all
2021-02-16 23:48:00.375 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2021-02-16 23:48:00.500 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2021-02-16 23:49:00.124 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
etc.
etc.
I know I can turn on more logging, or make the script tell which script is executed, but that results in at least a doubling of the log lines.
When saving a script, Domoticz lists all the scripts with their path and script name:
Code: Select all
2021-02-16 23:58:43.350 Status: dzVents: Write file: D:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\quakesEU.lua
2021-02-16 23:58:43.350 Status: dzVents: Write file: D:\Program Files (x86)\Domoticz\scripts\dzVents\generated_scripts\dailyEnergyCosts.lua
etc.
etc.
So, the following example would be more helpfull as a log line:
Code: Select all
2021-02-16 23:48:00.375 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\quakesEU.lua
Or is this too hard to code due to some limitation(s)?
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:26
by waaren
plugge wrote: Wednesday 17 February 2021 0:19
I would like to suggest to make log lines about Status Script event triggered more intelligible by including the script name.
Did you try to set below in settings - other ?

- log settings.jpg (26.4 KiB) Viewed 690 times
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:29
by plugge
waaren wrote: Wednesday 17 February 2021 0:26
plugge wrote: Wednesday 17 February 2021 0:19
I would like to suggest to make log lines about Status Script event triggered more intelligible by including the script name.
Did you try to set below in settings - other ?
Yes, I did. And I mentioned it in the post.
It triples the amount of log lines.
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:32
by waaren
plugge wrote: Wednesday 17 February 2021 0:29
It triples the amount of log lines.
Maybe I miss something but if I use this setting I don't see the behavior you describe. Can you please show what kind of extra loglines you see?
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:36
by plugge
Here's an example:
Code: Select all
2021-02-17 00:23:00.197 Status: dzVents: Info: ------ Start internal script: tesyStatus:, trigger: "every 1 minutes"
2021-02-17 00:23:00.212 Status: dzVents: Info: ------ Finished tesyStatus
2021-02-17 00:23:00.212 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
2021-02-17 00:23:00.291 Status: dzVents: Info: Handling httpResponse-events for: "status"
2021-02-17 00:23:00.291 Status: dzVents: Info: ------ Start internal script: tesyStatus: HTTPResponse: "status"
2021-02-17 00:23:00.322 Status: dzVents: Info: ------ Finished tesyStatus
2021-02-17 00:23:00.322 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
One line would do the job if the script name is included.
Addendum:
I do like to log that scripts are executed, so I keep "Log 'event script triggers'" On. But it would be more informative if it included the script name.
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 0:58
by waaren
plugge wrote: Wednesday 17 February 2021 0:36
One line would do the job if the script name is included.
Addendum:
I do like to log that scripts are executed, so I keep "Log 'event script triggers'" On. But it would be more informative if it included the script name.
If you use the settings I advised you should not see below type of line
Code: Select all
2021-02-17 00:23:00.212 Status: EventSystem: Script event triggered: D:\Program Files (x86)\Domoticz\dzVents\runtime\dzVents.lua
The reason that you see two times the line
Code: Select all
------ Start internal script: tesyStatus: HTTPResponse: "status"
is that it is triggered twice; so not much you can do about that.
If you want to keep the logline for "EventSystem: Script event triggered" then you will have to live with this for you useless information. The domoticz eventSystem only sees dzVents.lua
The dzVents user scripts, when triggered, are only visible to dzVents and not for the EventSystem.
Re: Make "Status: EventSystem: Script event triggered:" log more intelligible
Posted: Wednesday 17 February 2021 1:02
by plugge
waaren wrote: Wednesday 17 February 2021 0:58
The domoticz eventSystem only sees dzVents.lua
The dzVents user scripts, when triggered, are only visible to dzVents and not for the EventSystem.
So that's the limitation.
Thanks for clearing that up waaren.