Instance Methodswift-log 1.6.2Logging

critical(_:metadata:file:function:line:)

Log a message passing with the critical log level.

Logging.swift:617
func critical(_ message: @autoclosure () -> Logger.Message, metadata: @autoclosure () -> Logger.Metadata? = nil, file: String = #fileID, function: String = #function, line: UInt = #line)

Parameters

message

The message to be logged. message can be used with any string interpolation literal.

metadata

One-off metadata to attach to this log message.

file

The file this log message originates from (there’s usually no need to pass it explicitly as it defaults to #fileID.

function

The function this log message originates from (there’s usually no need to pass it explicitly as it defaults to #function).

line

The line this log message originates from (there’s usually no need to pass it explicitly as it defaults to #line).

.critical messages will always be logged.