0001 #if os(Linux) 0002 import Glibc 0003 #else 0004 import Darwin.C 0005 #endif 0006 0007 class Logger{ 0008 func currentTime
Arbiter.swift:37 let logger = Logger()SyncronousWorker.swift:12 let logger: LoggerSyncronousWorker.swift:20 init(logger: Logger, listeners: [Socket], timeout: Int, application: RequestType -> ResponseType) {Worker.swift:13 init(logger: Logger, listeners: [Socket], timeout: Int, application: RequestType -> ResponseType)() -> String { 0009 var t = time(nil) 0010 let tm = localtime(&t) 0011 let date = Data(capacity: 64) 0012 strftime(date.bytes, date.capacity, "%Y-%m-%d %T %z", tm) 0013 return date.string ?? "unknown" 0014 } 0015 0016 func info
Logger.swift:17 print("[\(currentTime())] [\(getpid())] [INFO] \(message)")Logger.swift:21 print("[\(currentTime())] [\(getpid())] [CRITICAL] \(message)")(message: String) { 0017 print("[\(currentTime())] [\(getpid())] [INFO] \(message)") 0018 } 0019 0020 func critical
Arbiter.swift:60 logger.info("Listening at http://\(address) (\(getpid()))")Arbiter.swift:112 logger.info("Shutting down")Arbiter.swift:246 logger.info("Worker exiting (pid: \(workerPid))")SyncronousWorker.swift:39 logger.info("Booting worker process with pid: \(getpid())")SyncronousWorker.swift:44 logger.info("Failed to boot \(error)")(message: String) { 0021 print("[\(currentTime())] [\(getpid())] [CRITICAL] \(message)") 0022 } 0023 } 0024
Arbiter.swift:205 logger.critical("Worker timeout (pid: \(pid))")