diff --git a/MemorialHouse/MHCore/MHCore/MHLogger.swift b/MemorialHouse/MHCore/MHCore/MHLogger.swift new file mode 100644 index 00000000..ae451cfc --- /dev/null +++ b/MemorialHouse/MHCore/MHCore/MHLogger.swift @@ -0,0 +1,31 @@ +import OSLog + +public enum MHLogger { + public static func debug(_ object: T?) { + #if DEBUG + let message = object != nil ? "[Debug] \(object!)" : "[Debug] nil" + os_log(.debug, "%@", message) + #endif + } + + public static func info(_ object: T?) { + #if DEBUG + let message = object != nil ? "[Info] \(object!)" : "[Info] nil" + os_log(.info, "%@", message) + #endif + } + + public static func error(_ object: T?) { + #if DEBUG + let message = object != nil ? "[Error] \(object!)" : "[Error] nil" + os_log(.error, "%@", message) + #endif + } + + public static func network(_ object: T?) { + #if DEBUG + let message = object != nil ? "[Network] \(object!)" : "[Network] nil" + os_log(.debug, "%@", message) + #endif + } +} diff --git a/MemorialHouse/MHCore/MHCore/Temp.swift b/MemorialHouse/MHCore/MHCore/Temp.swift deleted file mode 100644 index 87df07af..00000000 --- a/MemorialHouse/MHCore/MHCore/Temp.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// Temp.swift -// MHCore -// -// Created by 임정현 on 11/3/24. -// - -import Foundation -