From 6caed328cedfff8fd4c8b6187769c8d5c530d11a Mon Sep 17 00:00:00 2001 From: Kyxxn Date: Sat, 16 Nov 2024 04:14:47 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MemorialHouse/MHCore/MHCore/Temp.swift | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 MemorialHouse/MHCore/MHCore/Temp.swift 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 - From 7b9a63076873c58ce6d60b3c965f3c080d5349d6 Mon Sep 17 00:00:00 2001 From: Kyxxn Date: Sat, 16 Nov 2024 04:14:53 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20MHLogger=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MemorialHouse/MHCore/MHCore/MHLogger.swift | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 MemorialHouse/MHCore/MHCore/MHLogger.swift diff --git a/MemorialHouse/MHCore/MHCore/MHLogger.swift b/MemorialHouse/MHCore/MHCore/MHLogger.swift new file mode 100644 index 00000000..00d50d40 --- /dev/null +++ b/MemorialHouse/MHCore/MHCore/MHLogger.swift @@ -0,0 +1,31 @@ +import OSLog + +public enum MHLogger { + static func debug(_ object: T?) { + #if DEBUG + let message = object != nil ? "\(object!)" : "nil" + os_log(.debug, "%@", message) + #endif + } + + static func info(_ object: T?) { + #if DEBUG + let message = object != nil ? "\(object!)" : "nil" + os_log(.info, "%@", message) + #endif + } + + static func error(_ object: T?) { + #if DEBUG + let message = object != nil ? "\(object!)" : "nil" + os_log(.error, "%@", message) + #endif + } + + static func network(_ object: T?) { + #if DEBUG + let message = object != nil ? "\(object!)" : "nil" + os_log(.debug, "Network Log: %@", message) + #endif + } +} From a421884feb29b3f37ca58c0cbb87e79ccd250c08 Mon Sep 17 00:00:00 2001 From: Kyxxn Date: Sat, 16 Nov 2024 04:23:29 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20public=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MemorialHouse/MHCore/MHCore/MHLogger.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/MemorialHouse/MHCore/MHCore/MHLogger.swift b/MemorialHouse/MHCore/MHCore/MHLogger.swift index 00d50d40..ae451cfc 100644 --- a/MemorialHouse/MHCore/MHCore/MHLogger.swift +++ b/MemorialHouse/MHCore/MHCore/MHLogger.swift @@ -1,31 +1,31 @@ import OSLog public enum MHLogger { - static func debug(_ object: T?) { + public static func debug(_ object: T?) { #if DEBUG - let message = object != nil ? "\(object!)" : "nil" + let message = object != nil ? "[Debug] \(object!)" : "[Debug] nil" os_log(.debug, "%@", message) #endif } - static func info(_ object: T?) { + public static func info(_ object: T?) { #if DEBUG - let message = object != nil ? "\(object!)" : "nil" + let message = object != nil ? "[Info] \(object!)" : "[Info] nil" os_log(.info, "%@", message) #endif } - static func error(_ object: T?) { + public static func error(_ object: T?) { #if DEBUG - let message = object != nil ? "\(object!)" : "nil" + let message = object != nil ? "[Error] \(object!)" : "[Error] nil" os_log(.error, "%@", message) #endif } - static func network(_ object: T?) { + public static func network(_ object: T?) { #if DEBUG - let message = object != nil ? "\(object!)" : "nil" - os_log(.debug, "Network Log: %@", message) + let message = object != nil ? "[Network] \(object!)" : "[Network] nil" + os_log(.debug, "%@", message) #endif } }