From 37c1cdb1ba691e85b2d47cc7faed7a9cd11d5350 Mon Sep 17 00:00:00 2001 From: Sam Deane Date: Thu, 22 Oct 2020 17:19:12 +0100 Subject: [PATCH] log prelaunch --- Sources/LoggerKit/LoggerApplication+AppKit.swift | 4 ++-- Sources/LoggerKit/LoggerApplication+UIKit.swift | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/LoggerKit/LoggerApplication+AppKit.swift b/Sources/LoggerKit/LoggerApplication+AppKit.swift index 534d9a5..fae77c1 100644 --- a/Sources/LoggerKit/LoggerApplication+AppKit.swift +++ b/Sources/LoggerKit/LoggerApplication+AppKit.swift @@ -34,8 +34,8 @@ extension LoggerApplication: NSApplicationDelegate { if debug == nil { debug = NSMenuItem(title: "Debug", action: nil, keyEquivalent: "") debug?.submenu = NSMenu(title: "Debug") - if let index = menubar?.indexOfItem(withTitle: "Help") { - menubar?.insertItem(debug!, at: index) + if let label = menubar?.indexOfItem(withTitle: "Help") { + menubar?.insertItem(debug!, at: label) } } diff --git a/Sources/LoggerKit/LoggerApplication+UIKit.swift b/Sources/LoggerKit/LoggerApplication+UIKit.swift index b4743e5..01b4b35 100644 --- a/Sources/LoggerKit/LoggerApplication+UIKit.swift +++ b/Sources/LoggerKit/LoggerApplication+UIKit.swift @@ -21,6 +21,7 @@ import Logger /// Use this for quick setup only - for example to force log channels on/off. /// Proper setup should be deferred until later. open func prelaunch() { + applicationChannel.debug("prelaunch") } }