Meshtastic-Apple/Meshtastic/Extensions/Logger.swift

27 lines
753 B
Swift
Raw Normal View History

2024-06-04 17:30:58 -07:00
//
// Logger.swift
// Meshtastic
//
// Copyright(c) Garth Vander Houwen 6/3/24.
//
import OSLog
2024-06-03 02:17:55 -07:00
extension Logger {
/// The logger's subsystem.
private static var subsystem = Bundle.main.bundleIdentifier!
/// All logs related to data such as decoding error, parsing issues, etc.
2024-06-03 10:23:20 -07:00
static let data = Logger(subsystem: subsystem, category: "🗄️ Data")
2024-06-03 11:14:59 -07:00
2024-06-03 10:23:20 -07:00
/// All logs related to the mesh
static let mesh = Logger(subsystem: subsystem, category: "🕸️ Mesh")
2024-06-03 02:17:55 -07:00
/// All logs related to services such as network calls, location, etc.
2024-06-03 10:23:20 -07:00
static let services = Logger(subsystem: subsystem, category: "🍏 Services")
2024-06-03 02:17:55 -07:00
/// All logs related to tracking and analytics.
2024-06-03 10:23:20 -07:00
static let statistics = Logger(subsystem: subsystem, category: "📈 Stats")
2024-06-03 02:17:55 -07:00
}