mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-07 03:07:12 +00:00
Fixed: remove library CocoaLumberjack in XcodeCapp. This lib added memory leaks when using it in an NSOperation. We now simply use NSLog
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
{
|
||||
NSDictionary *appDefaults = @{
|
||||
XCCUserDefaultsAutoOpenXcodeProject: @YES,
|
||||
XCCUserDefaultsLogLevel: @LOG_LEVEL_WARN,
|
||||
XCCUserDefaultsMaxNumberOfConcurrentOperations: @20
|
||||
};
|
||||
|
||||
@@ -40,26 +39,6 @@
|
||||
self->statusItem.length = self->imageStatusInactive.size.width + 12;
|
||||
}
|
||||
|
||||
- (void)_initLogging
|
||||
{
|
||||
#if DEBUG
|
||||
[DDLog addLogger:[DDTTYLogger sharedInstance]];
|
||||
[[DDTTYLogger sharedInstance] setColorsEnabled:YES];
|
||||
[DDLogLevel setLogLevel:LOG_LEVEL_VERBOSE];
|
||||
#else
|
||||
[DDLog addLogger:[DDASLLogger sharedInstance]];
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
int logLevel = (int)[defaults integerForKey:XCCUserDefaultsLogLevel];
|
||||
NSUInteger modifiers = [NSEvent modifierFlags];
|
||||
|
||||
if (modifiers & NSAlternateKeyMask)
|
||||
logLevel = LOG_LEVEL_VERBOSE;
|
||||
|
||||
[DDLogLevel setLogLevel:logLevel];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)_initOperationQueue
|
||||
{
|
||||
self.mainOperationQueue = [NSOperationQueue new];
|
||||
@@ -116,12 +95,11 @@
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
DDLogVerbose(@"\n******************************\n** XcodeCapp started **\n******************************\n");
|
||||
NSLog(@"\n******************************\n** XcodeCapp started **\n******************************\n");
|
||||
|
||||
self.version = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
|
||||
|
||||
[self _initUserDefaults];
|
||||
[self _initLogging];
|
||||
[self _initOperationQueue];
|
||||
[self _initStatusItem];
|
||||
|
||||
@@ -132,7 +110,7 @@
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)app
|
||||
{
|
||||
DDLogVerbose(@"Stop listening to all projects");
|
||||
NSLog(@"Stop listening to all projects");
|
||||
[self.mainWindowController notifyCappuccinoControllersApplicationIsClosing];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
@@ -141,7 +119,7 @@
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
||||
{
|
||||
DDLogVerbose(@"\n******************************\n** XcodeCapp stopped **\n******************************\n");
|
||||
NSLog(@"\n******************************\n** XcodeCapp stopped **\n******************************\n");
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
|
||||
|
||||
Reference in New Issue
Block a user