No announcement yet.

Logging standards

  • Filter
  • Time
  • Show
Clear All
new posts

    Logging standards

    In HS3 we had hs.writelog and hs.writelogdetail, I used both based on whether it was legacy code or new code (using the latter).

    As far as I can tell, hs4 has WriteLog(logType As ELogType, message As String, pluginName As String, Optional color As String = "")
    but when I look at the result in the log file, I get confused.

    Click image for larger version

Name:	log.png
Views:	206
Size:	475.8 KB
ID:	1327468

    I don't seen the PI name showing up at all and I see the logtype being used either to really show log type but HS seems to use it also to show which function/module is writing the log item. Is this work in progress?

    I for one would like to have the capability to do selections based on logtype or pluginname or both.


    Same here. I do miss being able to set the plugins name in the log. It seems it is now quite limited. Showing hte plugins name makes it also a lot clearer where the log came from. Now if the message is not formatted with the name, it is going to be really hard to deternine where the message comes from.
    Even in HS3 sometimes confusing messages comes up. But for my plugin I can be sure, it the type does not contain JowiHue, it is not coming from my plugin. We need to be able to distinguish this by making sure the plugins name is present in the log is possible.
    -- Wim

    Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

    1210 devices/features ---- 392 events ----- 40 scripts


      I stopped depending on the HS logging early on (I did have it), and moved to Log4Net and then ultimately SeriLog which gives you tons of options for how to log (to file, to syslog server, etc).
      MeiAutomtion Home


        This is work in progress, there will be a "Source" column showing the plugin name


          What's the current Status ???

          Rien du Pre
          The Netherlands
          Homeseer PRO latest HS4 BETA on a Raspberry
          RFXCOM, mcsMQTT, Z-Wave