Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Logger

The Logger class provides a standardized way to log error, warning, or info messages. Trace the code execution and identify error or debug.
Use this signature to define the Logger class.
1public class Logger

Log an Informational Message

Use the message parameter to log an informational message by using this resource and signature.

info

1public static func info(_ message: String)

Log a Debug Message

Use the message parameter to log a debug message by using this resource and signature.

debug(_:)

1public static func debug(_ message: String)

Log an Error Message

Use the message parameter to log an error message by using this resource and signature.

error(_:)

1public static func error(_ message: String)

Log a Faulty Message

Use the message parameter to log a faulty message by using this resource and signature.

fault(_:)

1public static func fault(_ message: String)