//
//  Logger.swift
//  vectorsearch
//
//  Created by Du Qingjie on 2024/08/31.
//

import os
import Foundation

class Logger {
    static let shared = Logger()
    
    // Correctly initialize with subsystem and category
    private let logger = os.Logger(subsystem: Bundle.main.bundleIdentifier ?? "dqj.vectorsearch", category: "VectorSearch")
    
    func info(_ message: String) {
        logger.log("\(message, privacy: .public)")
    }

    func err(_ message: String) {
        logger.error("\(message, privacy: .public)")
    }
    
    func debug(_ message: String) {
        logger.debug("\(message, privacy: .public)")
    }
}
