For the complete documentation index, see llms.txt. This page is also available as Markdown.

Log

Log hooks allow you to output custom messages during the replication process. This is useful for debugging, monitoring, and creating audit trails of your data pipeline operations.

Configuration

- type: log
  message: "Custom log message"  # Required: The message to log
  level: info                    # Optional: Log level (info/warn/debug)
  on_failure: abort              # Optional: abort/warn/quiet/skip

Properties

Property
Required
Description

message

Yes

The message to log

level

No

Log level (info/warn/debug). Defaults to info

on_failure

No

What to do if logging fails (abort/warn/quiet/skip)

Output

When the log hook executes successfully, it returns the following output that can be accessed in subsequent hooks:

status: success  # Status of the hook execution
level: "info"    # The log level used
message: "Custom log message"  # The message that was logged

You can access these values in subsequent hooks using the following syntax (jmespath):

  • {state.hook_id.status} - Status of the hook execution

  • {state.hook_id.level} - The log level used

  • {state.hook_id.message} - The message that was logged

Examples

Log the basic status of a stream after completion:

Conditional Warning Log

Log a warning when row count is below threshold:

Debug Information

Log detailed information before starting the replication:

Performance Metrics Logging

Log performance metrics after successful completion:

Error Context Logging

Log detailed context when errors occur:

Audit Trail Logging

Create a detailed audit trail of replication activities:

Data Quality Logging

Log data quality metrics after processing:

8. Environment-Specific Logging (Pre-Hook)

Adjust log verbosity based on environment:

9. Resource Usage Logging (Post-Hook)

Log resource usage statistics:

10. Milestone Logging (Post-Hook)

Log important milestones during processing:

Last updated

Was this helpful?