Hubitat Log Messages

I’d really appreciate if you could add a switch to allow us to enable/disable the log messages from the SharpTools app in Hubitat. As we don’t have access to the source, we can’t control the logging with the current app.

It seems that a fair few of the messages are redundant as they don’t have any specific information in them (e.g. “Event data successfully posted to SharpTools.io”, “Sending event for hub …”).

If we were able to control the debug logging I’d also suggest that the “Sending event for hub…” messages are reduced from info level to debug level.

Just to add some technical to the debate: I have used the following pattern to control debug logging in app/drivers I’ve built (I don’t bother with the automatic scheduling to disable debug logging after install though).

preferences {
    ...
    section("<h3>Other Settings</h3>") {
      input(name: "debugLogging", type: "bool", title: "Enable/disable debug logging", defaultValue: true, required: false)
    }
}

def log(message) {
    if (debugLogging) {
	    log.debug message
    }
}

...

def someMethod() {
   log "I'm doing some method"
}

Thanks for sharing, @xap

We’ve made some improvements to logging in our development build of the SharpTools Hubitat app. We were hoping to group a couple of changes together before submitting them to the Hubitat team for release, but since we’ve had a few requests for this feature after Hubitat released their log history feature we might push it out as a minor update. :slight_smile:

3 Likes

Please do, I like the look of sharpTools however, I had to remove it from my HE hub because of the volume of log entries.

Any luck putting this in? My logs are filling up like crazy. Thanks!

I’m shooting to get the update submitted this upcoming week. Planning on rolling in one other change for buttons which needs a bit of testing before I submit.

3 Likes

Hubitat Update 2.0.2 includes an updated version of the built-in SharpTools HE App with the ability to enable/disable logging:

2 Likes

Thanks. After I give 2.0.2 a few days to make sure nothing amiss I will load Sharptools again.

Just make sure you are on Hubitat release 2.0.2.108 which has a hotfix for authorization of external services. :slight_smile: