mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
Logs sideloading-related events with OSLog
This commit is contained in:
33
AltStoreCore/Extensions/Logger+AltStore.swift
Normal file
33
AltStoreCore/Extensions/Logger+AltStore.swift
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Logger+AltStore.swift
|
||||
// AltStoreCore
|
||||
//
|
||||
// Created by Riley Testut on 10/2/23.
|
||||
// Copyright © 2023 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
@_exported import OSLog
|
||||
|
||||
public extension Logger
|
||||
{
|
||||
static let altstoreSubsystem = Bundle.main.bundleIdentifier!
|
||||
|
||||
static let sideload = Logger(subsystem: altstoreSubsystem, category: "Sideload")
|
||||
}
|
||||
|
||||
@available(iOS 15, *)
|
||||
public extension OSLogEntryLog.Level
|
||||
{
|
||||
var localizedName: String {
|
||||
switch self
|
||||
{
|
||||
case .undefined: return NSLocalizedString("Undefined", comment: "")
|
||||
case .debug: return NSLocalizedString("Debug", comment: "")
|
||||
case .info: return NSLocalizedString("Info", comment: "")
|
||||
case .notice: return NSLocalizedString("Notice", comment: "")
|
||||
case .error: return NSLocalizedString("Error", comment: "")
|
||||
case .fault: return NSLocalizedString("Fault", comment: "")
|
||||
@unknown default: return NSLocalizedString("Unknown", comment: "")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user