Instance Methodswift-log 1.6.2Logging

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

Log a message passing with the critical log level.

Logging.swift:584
func critical(_ message: @autoclosure () -> Logger.Message, metadata: @autoclosure () -> Logger.Metadata? = nil, source: @autoclosure () -> String? = 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.

source

The source this log messages originates from. Defaults to the module emitting the 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.