sparkle-project/Sparkle — pull request #456 by vslavik (2014-11-16 16:08:13+00:00)
Title: Don't call SUClearLog() unless logging something

Sparkle currently clears the log file and logs a `===== APPNAME =====` line every time `checkForUpdatesWithDriver:` is called; this of course happens e.g. immediately after launching the app if a check is due. This has two problems:

1. Contrary to `SUClearLog()` documentation, this doesn’t result in the last update’s log being preserved in the log. In fact, running any Sparkle-using app could erase the potentially important log content.

2. It is rather annoying, because it pops up debug log pane in Xcode (I have it configured to be hidden unless here’s some debugging activity happening).

This PR changes the behavior to what is IMHO more logical: Sparkle doesn’t touch the log unless it has something to add to it. When `SULog()` is called for the first time, it clears the log and adds information about the app to it. This ensures that the log file isn’t touched needlessly.