iOS2020. 7. 10. 17:23

class Log {
static func debug(_ msg: String, file: String, line: Int) {
print("\(Date()) \(file.components(separatedBy: "/").last ?? file) line \(line) \(msg)")
}
}

사용예...
Log.debug("log message", file:#file, line:#line)



Posted by 삼스