> For the complete documentation index, see [llms.txt](https://academy.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.pentaho.com/pentaho-data-integration/data-integration/concepts-and-terminology/logging.md).

# Logging

Set the transformation logging level ..

{% hint style="warning" %}

#### Workshop - Logging

Use logging to diagnose transformation problems. Create a controlled type mismatch error. Use log level and output to find the cause.

**What you’ll do**

* Change field metadata to trigger an error
* Run with **Basic** and **Row level** logging
* Use **Execution results** to find the failing step
* Locate the same error in `pdi.log`

**Prerequisites:** Complete the **Hello World** workshop

**Estimated time:** 5 minutes
{% endhint %}

{% embed url="<https://www.loom.com/share/868c1e73bdeb464e9ef5c2dd3c220d61?hideEmbedTopBar=true&hide_owner=true&hide_share=true&hide_title=true>" %}
Logging
{% endembed %}

***

{% hint style="info" %}
**Create a new transformation**

Use any of these options to open a new transformation tab:

* Select **File** > **New** > **Transformation**
* Use `Ctrl+N` (Windows/Linux) or `Cmd+N` (macOS)
  {% endhint %}

<figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-084fd579269b0cfeb95241c505ba6e67962e8f21%2Fhello%20world.tr.png?alt=media" alt="" width="375"><figcaption><p>Logging</p></figcaption></figure>

{% file src="/files/mkALCJT1B7bbbTJUrbOb" %}

{% tabs %}
{% tab title="1. Modify Generate Rows" %}
{% hint style="info" %}
Start from the transformation you built in **Hello World**.
{% endhint %}

{% hint style="info" %}

#### **Generate Rows**

Generate Rows is a test-data step. It is a quick way to validate logging and error handling.
{% endhint %}

{% hint style="warning" %}
To create an error, change the field type for `message` from **String** to **Integer**.
{% endhint %}

1. Double-click the **Generate Rows** step.
2. Change the type for `message` to **Integer**.

<div align="center"><figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-a918c5f15aa008762be0de711cdfdcafe3f80a2d%2Fchange%20to%20integer.png?alt=media" alt="" width="375"><figcaption><p>Change data type</p></figcaption></figure></div>

3. Select **OK**.
   {% endtab %}

{% tab title="2. Run" %}
{% hint style="info" %}

#### Run the transformation

Run with a higher log level to see row-level detail.
{% endhint %}

1. Select **Run** in the canvas toolbar.
2. Set **Log level** to **Basic**.
3. Select **Run**.
4. Run again with **Log level** set to **Row level**.

<div align="center"><figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-3e818248fddf4c8acb4787791fc4090885713dfe%2Flog%20-%20row%20level.png?alt=media" alt="" width="563"><figcaption><p>Set row level debugging</p></figcaption></figure></div>

5. Select **Run**. The failing step is highlighted.

<figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-fe81732737a4e65880ec8df0343eaea084288541%2Flog%20-%20step.png?alt=media" alt="" width="375"><figcaption><p>Error in step</p></figcaption></figure>

6. In **Execution results**, open the **Log** tab.

<figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-f97869a2e3a9886f6ab872d1b544aa5e94775363%2Flog%20error.png?alt=media" alt=""><figcaption><p>Logging - error</p></figcaption></figure>

The error text is in the log output. Look for the first **ERROR** entry.

{% hint style="info" %}
Tip: Select the minus icon to show errors only.

The same error is written to `pdi.log`:

{% tabs %}
{% tab title="Windows" %}
`C:\\Pentaho\\design-tools\\data-integration\\logs\\pdi.log`
{% endtab %}

{% tab title="macOS / Linux" %}
`~/Pentaho/design-tools/data-integration/logs/pdi.log`
{% endtab %}
{% endtabs %}
{% endhint %}

<figure><img src="https://3680356391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZpCSy6Skj215f4oWypdc%2Fuploads%2Fgit-blob-d568ff9c2d22880892ebbdb86a462e766e2e4717%2Fimage.png?alt=media" alt=""><figcaption><p>pdi.log - Linux</p></figcaption></figure>
{% endtab %}
{% endtabs %}

***

Next workshop: [Error Handling](https://academy.pentaho.com/pentaho-data-integration/data-integration/concepts-and-terminology/error-handling.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.pentaho.com/pentaho-data-integration/data-integration/concepts-and-terminology/logging.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
