From 39bc068b893af0cf9fd82e3f662f6a93947dda66 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 16 Apr 2016 16:42:14 -0400 Subject: [PATCH] Move Sparkle debug warning into +load Also use NSLog here instead of SULog because we don't want to start the logger early on --- Sparkle/SUUpdater.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index b6a69710..e25a59da 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -62,6 +62,15 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification @synthesize startedUpdater = _startedUpdater; @synthesize preStartedScheduledUpdateBlock = _preStartedScheduledUpdateBlock; +#ifdef DEBUG ++ (void)load +{ + // We're using NSLog instead of SULog here because we don't want to start Sparkle's logger here, + // nor want to write this message to disk + NSLog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!"); +} +#endif + - (instancetype)initWithHostBundle:(NSBundle *)bundle userDriver:(id )userDriver delegate:(id )theDelegate { self = [super init]; @@ -77,10 +86,6 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification _userDriver = userDriver; _delegate = theDelegate; - -#ifdef DEBUG - SULog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!"); -#endif } return self;