Skip to content

EXTENSION

WorkflowLogging¶

extension WorkflowLogging

Properties¶

isOSLoggingAllowed¶

public static let isOSLoggingAllowed: Bool = {
    let env = ProcessInfo.processInfo.environment
    guard let value = env["com.squareup.workflow.allowOSLogging"] else {
        return false
    }
    return (value as NSString).boolValue
}()

Flag indicating whether OSLog logs may be recorded. Note, actual emission of log statements in specific cases may depend on additional configuration options, so this being true does not necessarily imply logging will occur.

enabled¶

public static var enabled: Bool

Global setting to enable or disable logging. Note, this is independent of the specified config value, and simply governs whether the runtime should emit any logs.

To enable logging, at a minimum you must set: WorkflowLogging.enabled = true

Additionally, isOSLoggingAllowed must also be configured to be true.

If you wish for more control over what the runtime will log, you may additionally specify a custom value for WorkflowLogging.config.

config¶

public static var config: Config = .rootRendersAndActions

Configuration options used to determine which activities are logged.