Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

Clearing SquirrelSetup.log, or limiting what is logged

Open jpost opened this issue 9 years ago • 6 comments

I am currently integrating Squirrel into my electron project using their autoUpdater module:

https://github.com/electron/electron/blob/master/docs/api/auto-updater.md

I have the auto updates working perfectly. However, I check for an update every five minutes, and each time this check occurs, I get the following four logs, regardless of whether there is actually a new version available:

Program: Starting Squirrel Updater: --download [URL] Program: Fetching update information, downloading from [URL] CheckForUpdateImpl: Downloading RELEASES file from [URL] FileDownloader: Downloading url: [URL]

These logs really start to add up over a few days. Is there a way to suppress these logs? I think that would be ideal, but if this is not possible, is there an easy way to clear the log programmatically through an existing function call (obviously I could use a node module to clear out the file, but I'd like to use something that already exists in the framework if possible).

jpost avatar May 09 '16 20:05 jpost

@jpost Whoa, 5mins is way too often, set it to like 6-12hrs. We should probably clean these logs automatically, but again, you shouldn't check so often for updates

anaisbetts avatar May 09 '16 20:05 anaisbetts

@paulcbetts Hey Paul! I too am checking for updates semi-frequently and would really like to suppress these logs. I understand that a "solution" is to check less often but it would be far more robust if there was a way to control these logs in some fashion.

Is that possible today or on the radar for a future release? I'd hate to have to build in some sort of extra logic to ensure that log files do not exceed a certain size and even if I do check once every 6 hours I will still have to worry about that file size at some point.

Thanks!

niczak avatar May 09 '16 21:05 niczak

@niczak You can just delete the file if you're worried, we'll probably at some point put some kind of trimming in. I take PRs!

anaisbetts avatar May 09 '16 21:05 anaisbetts

@paulcbetts It's obviously an option to have the node file module take care of things as an extra step. And yeah man, if I get some free time I will issue a PR.

Thanks!

niczak avatar May 09 '16 21:05 niczak

It's a major bug IMHO, we have several customers with very large log files; multiple GB :-( And the updates are not checking each 5 minutes in our case. It's just that when Internet is blocked for some reasons, it adds logs.

Skywalker13 avatar Sep 19 '17 08:09 Skywalker13

Any news on this? We just noticed large log files 'CheckForUpdate.log' with our clients.

whitespacecode avatar Mar 13 '24 08:03 whitespacecode