ZitiLog
public class ZitiLog
Logger class that mirrors the Ziti C SDK’s logging feature
-
Maps to Ziti CSDK log levels, which cannot be imported directly
See moreDeclaration
Swift
public enum LogLevel : Int32
-
Initialize logger
Declaration
Swift
public init(_ category: String = "CZiti")
Parameters
category
descriptive name to differentiate unique logging areas
-
Initialize logger
Declaration
Swift
public convenience init(_ aClass: AnyClass)
Parameters
aClass
use name of this class as the loggng categy
-
Set the system-wide log level
Declaration
Swift
public class func setLogLevel(_ level: LogLevel)
Parameters
level
only log messages at this level or higher severity
-
Get the system-wide log level
Declaration
Swift
public class func getLogLevel() -> LogLevel
-
Log a message at
.TRACE
levelDeclaration
Swift
public func trace(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.VERBOSE
levelDeclaration
Swift
public func verbose(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.DEBUG
levelDeclaration
Swift
public func debug(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.INFO
levelDeclaration
Swift
public func info(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.WARN
levelDeclaration
Swift
public func warn(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.ERROR
levelDeclaration
Swift
public func error(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged
-
Log a message at
.WTF
level (“what a terrible failure”)Declaration
Swift
public func wtf(_ msg:String, file:StaticString=#file, function:StaticString=#function, line:UInt=#line)
Parameters
msg
message to log
file
name of the file that makes this log message
function
name of the function that makes this log message
line
line number where this message was logged