Skip to content

Commit

Permalink
➕[ADD] Logger 파일 추가 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
hryeong66 committed Feb 18, 2022
1 parent ca84957 commit 7af2917
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Umpah-iOS/Umpah-iOS/Global/Utils/Logger.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Logger.swift
// Umpah-iOS
//
// Created by 장혜령 on 2022/02/18.
//

import Foundation

class Logger {
static func debugDescription<T>(_ object: T?, filename: String = #file, line: Int = #line, funcName: String = #function) {
#if DEBUG
if let obj = object {
print("\(Date()) \(filename.components(separatedBy: "/").last ?? "")(\(line)) : \(funcName) : \(obj)")
} else {
print("\(Date()) \(filename.components(separatedBy: "/").last ?? "")(\(line)) : \(funcName) : nil")
}
#endif
}
}

0 comments on commit 7af2917

Please sign in to comment.