 }
 
 /// log with detail message
-private func print(
+private func log(
     _ items: Any..., separator: String = " ", terminator: String = "\n",
     file: String = #file, line: Int = #line, function: String = #function,
-    logLevel: LogLevel = .info) {
+    logLevel: LogLevel) {
     let fileName = URL(fileURLWithPath: file).deletingPathExtension().lastPathComponent
     print(logLevel.symbol, logLevel.rawValue, CFAbsoluteTimeGetCurrent(), "⇨", fileName, line, function)
     print(logLevel.symbol, logLevel.rawValue, CFAbsoluteTimeGetCurrent(), "⇨", fileName, line, function, to: &Log.shared)

#if canImport(Foundation)
import Foundation.NSThread

public enum LogLevel: String {
    case debug, info, warning, error, exception
}

fileprivate extension LogLevel {
    var symbol: String {
        switch self {
        case .debug: return "\u{0001F539}"

public func info(
    _ items: Any..., separator: String = " ", terminator: String = "\n",
    file: String = #file, line: Int = #line, function: String = #function) {
    return log(items, separator: separator, terminator: terminator,
               file: file, line: line, function: function, logLevel: .info)
}

public func debug(
    _ items: Any..., separator: String = " ", terminator: String = "\n",
    file: String = #file, line: Int = #line, function: String = #function) {
    return log(items, separator: separator, terminator: terminator,
               file: file, line: line, function: function, logLevel: .debug)
}

public func warning(
    _ items: Any..., separator: String = " ", terminator: String = "\n",
    file: String = #file, line: Int = #line, function: String = #function) {
    return log(items, separator: separator, terminator: terminator,
               file: file, line: line, function: function, logLevel: .warning)
}

public func error(
    _ items: Any..., separator: String = " ", terminator: String = "\n",
    file: String = #file, line: Int = #line, function: String = #function) {
    return log(items, separator: separator, terminator: terminator,
               file: file, line: line, function: function, logLevel: .error)
}

public func exception(
    _ items: Any..., separator: String = " ", terminator: String = "\n",
    file: String = #file, line: Int = #line, function: String = #function) {
    return log(items, separator: separator, terminator: terminator,
               file: file, line: line, function: function, logLevel: .exception)
}

#endif
