Skip to content

Instantly share code, notes, and snippets.

@hishd
Created March 27, 2024 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hishd/f4b9f712521a3a0af4cbde76020be18d to your computer and use it in GitHub Desktop.
Save hishd/f4b9f712521a3a0af4cbde76020be18d to your computer and use it in GitHub Desktop.
//
// Logger+Extensions.swift
// SkyWizard
//
// Created by Hishara Dilshan on 2023-10-10.
//
import OSLog
extension Logger {
private static var subsystem = Bundle.main.bundleIdentifier!
static let viewCycle = Logger(subsystem: subsystem, category: "viewcycle")
// Logger.viewCycle.notice("Notice example")
// Logger.viewCycle.info("Info example")
// Logger.viewCycle.debug("Debug example")
// Logger.viewCycle.trace("Trace example")
// Logger.viewCycle.warning("Warning example")
// Logger.viewCycle.error("Error example")
// Logger.viewCycle.fault("Fault example")
// Logger.viewCycle.critical("Critical example")
static let statistics = Logger(subsystem: subsystem, category: "statistics")
// Logger.statistics.debug("Statistics example")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment