Domotic.Log method for python plugin framework and domoticz log levels
Posted: Thursday 10 May 2018 13:08
Hi,
I'm running the domoticz service with -loglevel 1, which should show error and status messages. With this setting anything from within a python plugin except Domoticz.Error is ignored. Even when i set the plugin to debug mode "Domoticz.Debugging(1)".
Is there a way to generate a status message from a python plugin, so they will show with -loglevel 1? Or could different log levels be implemented for python plugins?
Use cases:
My Presence detection plugin logs when devices leave or arrive. I would like to see these messages in my log, but i do not want to enable the overall -loglevel 0 for domoticz, because that will flood my log with events from energy meters (P1), z-wave devices and other less important information.
If i (purposely) enable debug mode on a plugin i would like to see debug logging, regardless of the overall domoticz log setting.
I'm running the domoticz service with -loglevel 1, which should show error and status messages. With this setting anything from within a python plugin except Domoticz.Error is ignored. Even when i set the plugin to debug mode "Domoticz.Debugging(1)".
Is there a way to generate a status message from a python plugin, so they will show with -loglevel 1? Or could different log levels be implemented for python plugins?
Use cases:
My Presence detection plugin logs when devices leave or arrive. I would like to see these messages in my log, but i do not want to enable the overall -loglevel 0 for domoticz, because that will flood my log with events from energy meters (P1), z-wave devices and other less important information.
If i (purposely) enable debug mode on a plugin i would like to see debug logging, regardless of the overall domoticz log setting.