Page 1 of 1

Big log files

PostPosted: Fri Nov 08, 2019 2:14 am
by haavarda
Hi Nathan.
I was looking in to backing up my Indigo folder when I noticed that one of the biggest folders is my log folder. And the biggest folder inside the log folder is the hue plugin.
See the picture below. Is this normal?

Re: Big log files

PostPosted: Sat Nov 09, 2019 1:04 am
by nsheldon
Hi Håvard.

Yes. I'm aware of the large log files. Mine are huge as well. It's a result of Indigo automatically saving all debug level logging to the plugin log folder regardless of the debug log output settings within the plugin preferences. I'm not aware of any way to turn off that feature. And the Hue Lights plugin has to have highly detailed debug logs in order to troubleshoot problems when people report issues. It's safe to delete all of the plugin.log files, but they'll build up quickly again. They seem to be automatically limited by the Indigo server to just the debug logs for the last week, so you shouldn't ever see more than 6 files there.

Re: Big log files

PostPosted: Sat Nov 09, 2019 1:11 am
by haavarda
Thank you for the explanation Nathan.
And in other words then, no worries

Håvard


Sent from my iPhone using Tapatalk

Re: Big log files

PostPosted: Sat Nov 09, 2019 12:12 pm
by jay (support)
I don't understand the issue: Indigo logs exactly what you tell it to log... :?:

Re: Big log files

PostPosted: Sat Nov 09, 2019 1:40 pm
by nsheldon
Hi Jay.

In the "/Library/Application Support/Perceptive Automation/Indigo 7.4/Logs/com.nathansheldon.indigoplugin.HueLights folder there are 6 giant plugin.log files. They're giant because all debug logging is saved into those logs, regardless of the Hue Lights configuration. The debug logs don't appear in the Indigo log, just in the plugin.log. If you can tell me how to prevent debug logs from going there, that'd be great.

Re: Big log files

PostPosted: Sat Nov 09, 2019 3:36 pm
by jay (support)
I think I'm missing something: if you don't want it logged, then don't log, right?

i.e. set the log level to INFO (or something higher than DEBUG).

Re: Big log files

PostPosted: Sat Nov 09, 2019 3:39 pm
by nsheldon
I need debug logging code. Obviously. The question is how to change the log level of logs saved in the plugin.log.

Re: Big log files

PostPosted: Sat Nov 09, 2019 4:03 pm
by jay (support)
Check out the Plugin Specific Logging section of this post.

Specifically there are 3 things that control what log levels show up where:

Code: Select all
        self.logger.setLevel(logging.DEBUG)  # this controls what level of logging show up at the logger level (top level) and which gets passed to the various handlers
        self.indigo_log_handler.setLevel(logging.INFO) # this controls what shows up in Indigo's log window
        self.plugin_file_handler.setLevel(logging.DEBUG) # this controls what level of logging shows up in the plugin's log file

Re: Big log files

PostPosted: Sat Nov 09, 2019 6:29 pm
by nsheldon
Thanks Jay.

I'll add a fix in the next plugin update so that the plugin_file_handler log level always matches the indigo_log_handler. I only use the "indigo.server.log" and "self.debugLog" methods for outputting Indigo logs and debug logs. I'd never messed with the logger methods.

Re: Big log files

PostPosted: Sun Nov 10, 2019 4:40 pm
by jay (support)
If you always want debug messages to go both places (or neither place), then you can just use the first line - that will filter at the logger level (before it gets to the handlers).

Re: Big log files

PostPosted: Sun Nov 10, 2019 7:28 pm
by nsheldon
Got it. Thanks man!

Re: Big log files

PostPosted: Tue Nov 12, 2019 4:37 am
by nsheldon
Version 1.7.16 Posted

  • Added support for a new Hue LED spiral filament ST64 bulb.
  • Added support for the on/off OSRAM Smart+ Plug.
  • Fixed plugin log issue that caused plugin log files to grow very large.
  • Fixed the Innr On/Off Plug-in module so it appears in the On/Off Devices. If you already have the module set up with Hue Lights in Indigo, you MUST edit the device in Indigo and redefine it, otherwise it won't work after updating to version 1.7.16.

Re: Big log files

PostPosted: Tue Nov 12, 2019 4:41 am
by haavarda
Thanks Nathan.
Good idea to raise questions then i guess :)

Re: Big log files

PostPosted: Tue Nov 12, 2019 4:45 am
by nsheldon
Absolutely! :D