GBA001/Delta/Extensions/OSLog+Delta.swift
Riley Testut a9f15144ed Repairs corrupted Game, GameSave, and SaveState relationships on initial launch
Automatically fixes Game and GameSaves, but requires user to manually review + fix all recent SaveStates.
2023-08-10 19:33:27 -05:00

39 lines
974 B
Swift

//
// OSLog+Delta.swift
// Delta
//
// Created by Riley Testut on 8/10/23.
// Copyright © 2023 Riley Testut. All rights reserved.
//
import OSLog
extension OSLog.Category
{
static let database = "Database"
}
extension Logger
{
static let deltaSubsystem = "com.rileytestut.Delta"
static let database = Logger(subsystem: deltaSubsystem, category: OSLog.Category.database)
}
@available(iOS 15, *)
extension OSLogEntryLog.Level
{
var localizedName: String {
switch self
{
case .undefined: NSLocalizedString("Undefined", comment: "")
case .debug: NSLocalizedString("Debug", comment: "")
case .info: NSLocalizedString("Info", comment: "")
case .notice: NSLocalizedString("Notice", comment: "")
case .error: NSLocalizedString("Error", comment: "")
case .fault: NSLocalizedString("Fault", comment: "")
@unknown default: NSLocalizedString("Unknown", comment: "")
}
}
}