Instance Methodswift-log 1.6.2Logging

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

Log a message passing with the notice log level.

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

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