ConsoleLogHandler
open class ConsoleLogHandler : LogHandler
A default implementation of a LogHandler logging to Xcode’s console. This implementation uses Apple’s print() method to log to the console.
-
The log level of this handler. Set to .debug by default.
Declaration
Swift
public var logLevel: LogLevel
-
The formatter defines the representation of the output string for a log record.
Declaration
Swift
public let formatter: LogFormatter
-
Returns the synchronization queue for synchronizing log output. subclasses may override this computed property to return their own synchronization queue.
Declaration
Swift
open class var synchronizationQueue: DispatchQueue { get }
-
Initializes a new DefaultHandler instance
Declaration
Swift
public init(formatter: LogFormatter = ConsoleLogFormatter())
Parameters
formatter
an instance of a class that conforms to the Formatter protocol (optional).
-
Publishes the given LogRecord to console.
Declaration
Swift
open func publish(_ record: LogRecord)
Parameters
record
the LogRecord to publish.