Logo of php-etl
Getting Started
🐘 Standalone 🎵 Symfony 🦢 Sylius
Core Concepts
The Concept Execution Context Item Types Custom Operations Glossary FAQ
⛓️ Operations
Building Blocks
Split Merge Repeat Safe
Extract
File Finder CSV JSON
Transform
External File Processor Filter Data Rule Transformer Split Item HTTP Client Log Callback
Aggregation
Simple Grouping
Load
CSV JSON
🧑‍🍳 Cookbook
Without Context
Grouping / Aggregation Filtering Splitting/Forking Making your chains configurable Complex data to csv / Flatten Data Api to CSV N°1 Api to CSV N°2 Sub chains
With Context
Api to CSV Import external file
Custom Operations

PHP-ETL - Operations
Transform - Log(log)

The log operation writes messages to the logger, useful for debugging and tracking ETL process progress.

Options

  • message: The message to be logged. You can use the Symfony Expression Language to dynamically generate the message. To use the expression language, prefix the message with @.
  • level: The log level. Must be one of the following: debug, info, notice, warning, error, critical, alert, emergency.
  • context: (Optional) An array of data to be included in the log context. The keys of the array are the names of the context variables, and the values are the keys from the input data.

Example

Here’s an example of how to use the log operation to log a message with the user’s ID and email address:

chain:
  - operation: log
    options:
      level: info
      message: "@'Processing user ' ~ data.id"
      context:
        user_id: id
        email: email

Network

GitHub Repo Issues Good First Issues

Help Preserve This Project

Support for the continued development of php ETL. I maintain this project in my free time.

Support
Free & Open Source (MIT)