Instance Methodswift-log 1.6.2Logging

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

Log a message passing with the warning log level.

Logging.swift:497
func warning(_ 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).

If .warning is at least as severe as the Logger’s logLevel, it will be logged, otherwise nothing will happen.