init(label:metadataProvider:)

Construct a Logger given a label identifying the creator of the Logger and a non-standard MetadataProvider.

Logging.swift:932
init(label: String, metadataProvider: MetadataProvider)

Parameters

label

An identifier for the creator of a Logger.

metadataProvider

The custom metadata provider this logger should invoke, instead of the system wide bootstrapped one, when a log statement is about to be emitted.

The label should identify the creator of the Logger. This can be an application, a sub-system, or even a datatype.

This initializer provides an escape hatch in case the global default logging backend implementation (set up using LoggingSystem.bootstrap is not appropriate for this particular logger.