TKLogger
public protocol TKLogger
A TKLogger
is used by TKLog
to perform the outputting and processing of log statements.
A default TKConsoleLogger
is provided.
-
log(identifier:
Default implementationrequest: ) Called by
TKLog
with requests, typically maded byTKServer
This is optional. By default
output
will be called iflevel
is less or equal.info
Default Implementation
Declaration
Swift
func log(identifier: String, request: TKLog.ServerRequest)
Parameters
identifier
An identifier for who is logging this, typically a class name.
request
The request that was made
-
log(identifier:
Default implementationresponse: ) Called by
TKLog
when server response was received, typically initiated byTKServer
This is optional. By default
output
will be called iflevel
is less or equal.info
Default Implementation
Declaration
Swift
func log(identifier: String, response: TKLog.ServerResponse)
Parameters
identifier
An identifier for who is logging this, typically a class name.
response
The response that was received (or error information, if no response received)
-
log(_:
Extension methodidentifier: message: ) Undocumented
Declaration
Swift
func log(_ level: TKLog.LogLevel, identifier: String, message: String)