File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -123,13 +123,22 @@ + (void) openLog {
123123 // Initialize the log
124124 @synchronized (self) {
125125 if (bnc_logURL) {
126- BNCLogSetOutputToURLByteWrap (bnc_logURL, 102400 );
126+ #if defined(BNCKeepLogfiles)
127+ BNCLogSetOutputToURLByteWrap (bnc_logURL, 102400 );
128+ #else
129+ BNCLogSetOutputFunction (NULL );
130+ #endif
127131 } else {
128132 BNCLogInitialize ();
129133 BNCLogSetDisplayLevel (BNCLogLevelAll);
130134 bnc_logURL = BNCURLForBranchDirectory ();
131135 bnc_logURL = [[NSURL alloc ] initWithString: @" Branch.log" relativeToURL: bnc_logURL];
132- BNCLogSetOutputToURLByteWrap (bnc_logURL, 102400 );
136+ #if defined(BNCKeepLogfiles)
137+ BNCLogSetOutputToURLByteWrap (bnc_logURL, 102400 );
138+ #else
139+ BNCLogSetOutputFunction (NULL );
140+ [[NSFileManager defaultManager ] removeItemAtURL: bnc_logURL error: nil ];
141+ #endif
133142 BNCLogSetDisplayLevel (BNCLogLevelWarning); // Default
134143
135144 // Try loading from the Info.plist
You can’t perform that action at this time.
0 commit comments