Browse Source

Use Logger instead of print.

pull/113/head
Abhishek Banthia 2 years ago
parent
commit
24bb901400
  1. 5
      Clocker/Overall App/ConfigExport.swift
  2. 2
      Clocker/Overall App/DataStore.swift
  3. 3
      Clocker/Panel/Rate Controller/UpcomingEventView.swift

5
Clocker/Overall App/ConfigExport.swift

@ -1,6 +1,7 @@
// Copyright © 2015 Abhishek Banthia
import CoreModelKit
import CoreLoggerKit
import Foundation
struct ConfigExport {
@ -34,7 +35,7 @@ struct ConfigExport {
var clockerPrefs: [String: Any] = [:]
for (key, value) in dictionaryRep {
if selectedKeys.contains(key) {
print("Key is \(key) and value is \(value)")
Logger.info("Config Export: Key is \(key) and value is \(value)")
clockerPrefs[key] = value
}
}
@ -73,7 +74,7 @@ struct ConfigExport {
let json = try JSONSerialization.data(withJSONObject: clockerPrefs, options: .prettyPrinted)
print(json)
} catch {
print("Failure Observed \(error.localizedDescription)")
Logger.info("Failure Observed \(error.localizedDescription)")
}
}
}

2
Clocker/Overall App/DataStore.swift

@ -66,7 +66,7 @@ class DataStore: NSObject {
@objc func ubiquitousKeyValueStoreChanged(_ notification: Notification) {
let userInfo = notification.userInfo ?? [:]
let ubiquitousStore = notification.object as? NSUbiquitousKeyValueStore
print("--- User Info is \(userInfo)")
Logger.info("Ubiquitous Store Changed: User Info is \(userInfo)")
let currentTimezones = userDefaults.object(forKey: CLDefaultPreferenceKey) as? [Data]
let cloudTimezones = ubiquitousStore?.object(forKey: CLDefaultPreferenceKey) as? [Data]
let cloudLastUpdateDate = (ubiquitousStore?.object(forKey: CLUbiquitousStoreLastUpdateKey) as? Date) ?? Date()

3
Clocker/Panel/Rate Controller/UpcomingEventView.swift

@ -1,6 +1,7 @@
// Copyright © 2015 Abhishek Banthia
import Cocoa
import CoreLoggerKit
class ModernSliderContainerView: NSView {
private var trackingArea: NSTrackingArea?
@ -67,7 +68,7 @@ class DraggableClipView: NSClipView {
clickPoint = nil
gestureInProgress = false
default:
print("Default case is happening \(event.type)")
Logger.info("Default mouse event occurred for \(event.type)")
}
}
}

Loading…
Cancel
Save