TKLog

@objc
public class TKLog : NSObject

The main class to log something from TripKit. The actual logging is done by the TKLogger instances set on the .logger property.

  • Declaration

    Swift

    public enum LogLevel : Int
  • The loggers which do the actual logging work. By default this is empty, unless TripKit is compiled with a BETA or DEBUG Swift flag, then it’s a TKConsoleLogger with a log level of “warning”.

    Declaration

    Swift

    public static var loggers: [TKLogger]
  • Declaration

    Swift

    @objc
    public class func info(_ identifier: String, block: () -> String)
  • Declaration

    Swift

    @objc
    public class func debug(_ identifier: String, block: () -> String)
  • Declaration

    Swift

    @objc
    public class func verbose(_ identifier: String, block: () -> String)
  • Declaration

    Swift

    @objc
    public class func error(_ identifier: String, text message: String)
  • Declaration

    Swift

    @objc
    public class func warn(_ identifier: String, text message: String)
  • Declaration

    Swift

    @objc
    public class func info(_ identifier: String, text message: String)
  • Declaration

    Swift

    @objc
    public class func debug(_ identifier: String, text message: String)
  • Declaration

    Swift

    @objc
    public class func verbose(_ identifier: String, text message: String)

Server requests

  • Declaration

    Swift

    public typealias ServerResult = Result<(URLResponse, Data?), NSError>
  • The URL request along with a UUID to identify each request sent

    See more

    Declaration

    Swift

    public struct ServerRequest : Hashable
  • A response to a ServerRequest

    See more

    Declaration

    Swift

    public struct ServerResponse : Hashable

Formatting helpers