Page 1 of 1
Log functions in Domoticz
Posted: Monday 29 January 2024 9:24
by psubiaco
Hi,
on python plugin I have the possibility to enable/disable Info, Error, Status logging.
Domoticz.Log() logs anything to the log
Domoticz.Debug() logs only if Domoticz.Debugging==1 or Domoticz.Debugging&2 , right?
Domoticz.Error() logs only if Error logging is enabled in the plugin configuration
Domoticz.Status() logs only if Status logging is enabled in the plugin configuration
WHAT ABOUT Info ?

- error_status_info.png (9.67 KiB) Viewed 1180 times
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 11:08
by Kedi
Did you try it? And what are the differences?
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 11:54
by waltervl
I do not understand you question...
The log level settings in your screenshot decide if the info/status/error messages are being sent to the Domoticz log file.
A Python plugin can have additional debug levels (if implemented by the plugin author) and if set the debug messages will be shown as INFO messages in domoticz log if I am not wrong.
Edit:
I suppose Domoticz.Log() writes INFO messages.
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 12:29
by psubiaco
Hi Walter,
Domoticz.Log() always write to the log file, without care of Info ON/OFF status.
Domoticz.Error() and Domoticz.Status() work perfectly, but I don't know how to manage the Info ON/OFF flag.
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 13:14
by waltervl
Then it seems it is not implemented correctly in the Python Framework. Do you use old or new framework (DomoticzEx)?
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 13:40
by psubiaco
waltervl wrote: ↑Monday 29 January 2024 13:14
Then it seems it is not implemented correctly in the Python Framework. Do you use old or new framework (DomoticzEx)?
I'm using the old Domoticz framework.
Re: Log functions in Domoticz
Posted: Monday 29 January 2024 14:10
by waltervl
It is better to use the new framework, not guaranteed it will work but then it could be repaired,