# Write to Log

### Description

The `Write to log` action writes a specific string to the Hop logging system.

This action is similar to the [Write To Log](https://github.com/mbertazz/hop-docs-md/blob/main/modules/ROOT/pages/workflow/actions/pipeline/transforms/writetolog.cOEDlIs7Rj) transform.

Typical use cases are logging variable values and additional, custom logging information to the Hop logging system.

{% hint style="info" %}
Tip: Be careful when writing variables for (unencrypted) passwords or other sensitive information to the Hop logging system!
{% endhint %}

Parameters and variables must be specified in the Log message section.

A Logging level must be set. Set the Log detail level to Basic if you want parameters and variables to be printed out.

Example to print parameter or variable in Log message section: `COUNTER: ${COUNTER}`

{% hint style="info" %}
Tip: If an error stops anything from being written to the log, then disable the Hops that fail, add logging, and re-run.
{% endhint %}

### Options

| Option      | Description                                                                                                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action name | The name of the workflow action.                                                                                                                                                   |
| Log level   | The logging level to use. See [Logging](https://github.com/mbertazz/hop-docs-md/blob/main/modules/ROOT/pages/workflow/actions/logging/logging-basics.cOEDlIs7Rj) for more details. |
| Log subject | The subject to use in the logging line(s)                                                                                                                                          |
| Log message | The log message to write to the log                                                                                                                                                |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/writetolog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
