Logger
public protocol Logger
The contract for logging service. All logging service providers must conform to this protocol.
-
Logs a developer-formatted message using the
.debugtype.The caller is responsible for including public/private formatting in the format string, as well as any source location info (line number, etc.).
Declaration
Swift
@inlinable func logDebug(format: StaticString, args: CVarArg...)Parameters
formatA C-style format string.
argsA list of arguments to the format string (if any).
-
logDebug(_:Default implementationfile: function: line: ) Logs a message using the
.debugtype.Default Implementation
Logs a message using the
.debugtype.Declaration
Swift
@inlinable func logDebug(_ value: Any, file: String, function: String, line: UInt)Parameters
valueThe value to be logged. If the value does not already conform to CustomLogRepresentable, a default implementation will used.
-
Logs the source location of the call site using the
.debugtype.Declaration
Swift
@inlinable func trace(file: String, function: String, line: UInt)
-
Logs a developer-formatted message using the
.infotype.The caller is responsible for including public/private formatting in the format string, as well as any source location info (line number, etc.).
Declaration
Swift
@inlinable func logInfo(format: StaticString, args: CVarArg...)Parameters
formatA C-style format string.
argsA list of arguments to the format string (if any).
-
logInfo(_:Default implementationfile: function: line: ) Logs a message using the
.infotype.Default Implementation
Logs a message using the
.infotype.Declaration
Swift
@inlinable func logInfo(_ value: Any, file: String, function: String, line: UInt)Parameters
valueThe value to be logged. If the value does not already conform to CustomLogRepresentable, a default implementation will used.
-
Logs a developer-formatted message using the
.defaulttype.The caller is responsible for including public/private formatting in the format string, as well as any source location info (line number, etc.).
Declaration
Swift
@inlinable func log(format: StaticString, args: CVarArg...)Parameters
formatA C-style format string.
argsA list of arguments to the format string (if any).
-
log(_:Default implementationfile: function: line: ) Logs a message using the
.defaulttype.Default Implementation
Logs a message using the
.defaulttype.Declaration
Swift
@inlinable func log(_ value: Any, file: String, function: String, line: UInt)Parameters
valueThe value to be logged. If the value does not already conform to CustomLogRepresentable, a default implementation will used.
-
Logs a developer-formatted message using the
.errortype.The caller is responsible for including public/private formatting in the format string, as well as any source location info (line number, etc.).
Declaration
Swift
@inlinable func logError(format: StaticString, args: CVarArg...)Parameters
formatA C-style format string.
argsA list of arguments to the format string (if any).
-
logError(_:Default implementationfile: function: line: ) Logs a message using the
.errortype.Default Implementation
Logs a message using the
.errortype.Declaration
Swift
@inlinable func logError(_ value: Any, file: String, function: String, line: UInt)Parameters
valueThe value to be logged. If the value does not already conform to CustomLogRepresentable, a default implementation will used.
-
Logs a developer-formatted message using the
.faulttype.The caller is responsible for including public/private formatting in the format string, as well as any source location info (line number, etc.).
Declaration
Swift
@inlinable func logFault(format: StaticString, args: CVarArg...)Parameters
formatA C-style format string.
argsA list of arguments to the format string (if any).
-
logFault(_:Default implementationfile: function: line: ) Logs a message using the
.faulttype.Default Implementation
Logs a message using the
.faulttype.Declaration
Swift
@inlinable func logFault(_ value: Any, file: String, function: String, line: UInt)Parameters
valueThe value to be logged. If the value does not already conform to CustomLogRepresentable, a default implementation will used.