That's not entirely correct as you can see from your logs.
The only time you see the duration of your logs is when this script took too much time to finish.
(Unless you count the time between the two log lines. which is like a millisecond for the script above)
Lots of things regarding dzVents logging has been changed.
LOG_INFO is now handled as normal internal info log messages
LOG_STATUS is now handled as normal internal status log messages
LOG_ERROR is now handled as normal internal staus log messages
LOG_DEBUG, is handled as info, but when you specify this log level in your script as minimum level, you will see the execution info.
I also added a dzVents 'Logging' example. (create a new dzVents script with the + button and choose the logging example)
I don't know how many scripts you have, or what the triggers are, but I have plenty!
Because I also have to handle P1 electric values which update every 5 seconds here, I get tons of log messages, even if the script itself is not doing anything, the -----start and ----finish are always shown.
For this reason, there is now also an option under Settings->Other->dzVents to specify the 'Log Level', default this is Info+Status+Errors+Exceution_Info, I have set this to Info,Status,Errors for now (and will set it to Status,Errors later.
If you want to log something in your script you add log lines (see the Logging example), and you can specify the minimum log level.
For instance if you set this to LOG_ERROR like
Code: Select all
logging = {
level = domoticz.LOG_ERROR,
marker = "my_script"
},
And you log something with
Or
Code: Select all
domoticz.log('INFO log line!', domoticz.LOG_INFO)
domoticz.log('STATUS log line!', domoticz.LOG_STATUS)
All these messages are not displayed
This is displayed:
Code: Select all
domoticz.log('ERROR log line!', domoticz.LOG_ERROR)
If you do not specify a log level, the status will be domoticz.LOG_INFO
If you want to debug your start/finished or other debug lines, set the level to domoticz.LOG_DEBUG
You can also always force a log with domoticz.LOG_FORCE