blob: 3761448d9788a566ca67ca0a754e248444a24359 [file] [log] [blame]
//
// AppDelegate.swift
// SwiftTest
//
// Created by C.W. Betts on 9/5/14.
//
//
import Cocoa
import CocoaLumberjack
import CocoaLumberjackSwift
let ourLogLevel = DDLogLevel.Verbose
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
func applicationDidFinishLaunching(aNotification: NSNotification) {
DDLog.addLogger(DDTTYLogger.sharedInstance())
defaultDebugLevel = .Warning
DDLogVerbose("Verbose");
DDLogInfo("Info");
DDLogWarn("Warn");
DDLogError("Error");
defaultDebugLevel = ourLogLevel
DDLogVerbose("Verbose");
DDLogInfo("Info");
DDLogWarn("Warn");
DDLogError("Error");
defaultDebugLevel = .Off
DDLogVerbose("Verbose", level: ourLogLevel);
DDLogInfo("Info", level: ourLogLevel);
DDLogWarn("Warn", level: ourLogLevel);
DDLogError("Error", level: ourLogLevel);
DDLogError("Error \(5)", level: ourLogLevel);
}
func applicationWillTerminate(aNotification: NSNotification) {
// Insert code here to tear down your application
}
}