//
//  AppLogger.swift
//  Reflect
//
//  Centralized logging using OSLog for production-ready logging.
//

import Foundation
import os.log

/// Centralized logging utility using OSLog
enum AppLogger {
    // MARK: - Loggers by Category

    static let general = Logger(subsystem: subsystem, category: "General")
    static let iap = Logger(subsystem: subsystem, category: "IAP")
    static let healthKit = Logger(subsystem: subsystem, category: "HealthKit")
    static let liveActivity = Logger(subsystem: subsystem, category: "LiveActivity")
    static let notifications = Logger(subsystem: subsystem, category: "Notifications")
    static let photos = Logger(subsystem: subsystem, category: "Photos")
    static let export = Logger(subsystem: subsystem, category: "Export")
    static let settings = Logger(subsystem: subsystem, category: "Settings")
    static let biometrics = Logger(subsystem: subsystem, category: "Biometrics")
    static let ai = Logger(subsystem: subsystem, category: "AI")
    static let events = Logger(subsystem: subsystem, category: "Events")
    static let userDefaults = Logger(subsystem: subsystem, category: "UserDefaults")
    static let backgroundTasks = Logger(subsystem: subsystem, category: "BackgroundTasks")

    // MARK: - Private

    private static var subsystem: String {
        Bundle.main.bundleIdentifier ?? "com.88oakapps.reflect"
    }
}
