Big log files

This forum is archived topics from before the plugin was moved to the new owner. All topics are locked, but are preserved here for future reference.
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Big log files

Post 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?
Attachments
Skjermbilde 2019-11-08 kl. 09.09.41.png
Skjermbilde 2019-11-08 kl. 09.09.41.png (126.08 KiB) Viewed 3384 times
Håvard
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post 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.
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Big log files

Post by haavarda »

Thank you for the explanation Nathan.
And in other words then, no worries

Håvard


Sent from my iPhone using Tapatalk
Håvard
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Big log files

Post by jay (support) »

I don't understand the issue: Indigo logs exactly what you tell it to log... :?:
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post 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.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Big log files

Post 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).
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post by nsheldon »

I need debug logging code. Obviously. The question is how to change the log level of logs saved in the plugin.log.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Big log files

Post 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
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post 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.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Big log files

Post 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).
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post by nsheldon »

Got it. Thanks man!
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post 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.
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Big log files

Post by haavarda »

Thanks Nathan.
Good idea to raise questions then i guess :)
Håvard
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Big log files

Post by nsheldon »

Absolutely! :D
Locked

Return to “Archives”