Skip to content

CaptureLog

Name Mandatory Description Default Type
⬅️ Input The input of the shard, if any None
Output ➡️ The resulting output of the shard [String]
Content No The content of the log message none Shard[Shard]
Silent No Whether to suppress log output false Bool
Format No Custom format pattern for log messages (%P will record the process's life time, %p will record the shard's life time) [%l] %v String
MinLevel No The minimum level of logs to capture LogLevel::Info LogLevel

Captures log messages with additional control over silent mode and format pattern. When silent mode is enabled, log output is suppressed. A custom format pattern can be specified to control how log messages are formatted.

Examples

1
2
3
4
CaptureLog({
  Msg("Hello shards!")
} Format: "%^[%l]%$ [%Y-%m-%d %T.%e] %v")
ExpectStringSeq

[info] [sample-wire] Hello shards!