Disable SQL logging not working?

Posted on
Thu Jan 07, 2021 8:26 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Disable SQL logging not working?

aldonc wrote:
Hi Matt, looks like that worked. I'll keep an eye and post back if I see continuing issues.

thanks, Aldon

Fantastic. Looks like that sorted it. The SQL Logging setting was a later addition to the plugin and it looks like there may be some instances where a plugin upgrade doesn't handle updating existing devices, or situations where the setting gets out of sync. I'll have a look at the code and see if anything looks fishy.

Thanks to Matt for helping to sort the issue!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Jan 07, 2021 8:56 pm
aldonc offline
Posts: 22
Joined: Jan 10, 2015

Re: Disable SQL logging not working?

Hi Dave, Looks like I spoke too soon. It appears that even with Disable SQL Logging enabled, it tries to create the table.

I deleted a GhostXML device, I disabled SQL Logger, I reloaded GhostXML and re-created the device (with Disable SQL Logging enabled), then enabled SQL Logger and it recreates the table.

I have to get on a call for work so won't be able to experiment more tonight.

thanks, Aldon

Posted on
Thu Jan 07, 2021 9:27 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Disable SQL logging not working?

Thanks Aldon - totally understand that you don't have time to do this tonight. When you do find the time, if you would be kind enough to run the following script and send me the results. If there are any data that are sensitive, please be sure to mask them. Change 12345678 to the ID of your device. The result below is a dummy device I use for testing.

Code: Select all
dev = indigo.devices[12345678]
indigo.server.log(u"{0}".format(dev.ownerProps))
The prop we're interested in is the bold one:

com.fogbert.indigoplugin.GhostXML : (dict)
curlArray : (string)
curlSubA : (string)
curlSubB : (string)
curlSubC : (string)
curlSubD : (string)
curlSubE : (string)
curlSubs : false (bool)
digestPass : (string)
digestUser : (string)
disableGlobbing : false (bool)
disableLogging : true (bool)
doSubs : false (bool)
feedType : JSON (string)
maxRetries : 10 (string)
refreshFreq : 60 (string)
sourceXML : http://httpbin.org/bearer (string)
sqlLoggerIgnoreStates : * (string)
subA : (string)
subB : (string)
subC : (string)
subD : (string)
subE : (string)
timeout : 5 (string)
token : Dave123 (string)
tokenUrl : (string)
useDigest : Bearer (string)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Jan 08, 2021 12:49 pm
aldonc offline
Posts: 22
Joined: Jan 10, 2015

Re: Disable SQL logging not working?

Hi Dave,
Note that this is the device I described above (new device, etc).
Code: Select all
     Interactive Shell               com.fogbert.indigoplugin.GhostXML : (dict)
     curlArray :  (string)
     curlSubA :  (string)
     curlSubB :  (string)
     curlSubC :  (string)
     curlSubD :  (string)
     curlSubE :  (string)
     curlSubs : false (bool)
     digestPass :  (string)
     digestUser :  (string)
     disableLogging : true (bool)
     doSubs : false (bool)
     feedType : JSON (string)
     maxRetries : 10 (string)
     refreshFreq : 3600 (string)
     sqlLoggerIgnoreStates : * (string)
     subA :  (string)
     subB :  (string)
     subC :  (string)
     subD :  (string)
     subE :  (string)
     timeout : 5 (string)
     token :  (string)
     tokenUrl :  (string)
     useDigest : None (string)

I removed the URL.

thanks, Aldon

Posted on
Fri Jan 08, 2021 1:08 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Disable SQL logging not working?

Thanks Aldon -- that looks right to me. Based onMatt's message above, that looks like it should work. Matt said that the change would be applied in Indigo 7.5--are you on 7.5? If you're on 7.4 or earlier, I don't think there's anything I can do.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Jan 08, 2021 4:16 pm
matt (support) offline
Site Admin
User avatar
Posts: 20569
Joined: Jan 27, 2003
Location: Texas

Re: Disable SQL logging not working?

Dave – I think the problem is you are setting sqlLoggerIgnoreStates on dev.pluginProps instead of dev.sharedProps. Try something like:

Code: Select all
sharedProps = dev.sharedProps
sharedProps["sqlLoggerIgnoreStates"] = "*"
dev.replaceSharedPropsOnServer(sharedProps)

You can keep it in pluginProps as well obviously, but when the UI is closed push it to sharedProps as well (hopefully that won't stomp on the other prop changes overwriting pluginProps).

Image

Posted on
Fri Jan 08, 2021 5:09 pm
aldonc offline
Posts: 22
Joined: Jan 10, 2015

Re: Disable SQL logging not working?

Just to confirm, I'm on Indigo 7.5.0.

thanks, Aldon

Posted on
Fri Jan 08, 2021 6:05 pm
DaveL17 offline
User avatar
Posts: 5909
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Disable SQL logging not working?

matt (support) wrote:
Dave – I think the problem is you are setting sqlLoggerIgnoreStates on dev.pluginProps instead of dev.sharedProps. Try something like:

Code: Select all
sharedProps = dev.sharedProps
sharedProps["sqlLoggerIgnoreStates"] = "*"
dev.replaceSharedPropsOnServer(sharedProps)

You can keep it in pluginProps as well obviously, but when the UI is closed push it to sharedProps as well (hopefully that won't stomp on the other prop changes overwriting pluginProps).

Thanks Matt -- that's something that seems like it would make a difference....

Aldon (and everyone else) I'll get on this asap.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest