# Write Log Message

{% hint style="info" %}
**Block Information**

Available in: Page Flow and Cloud Flow

Toolbox Category: Action - Log

Block Type: [Regular](/app-editor/page-flow/block-anatomy.md#regular-block)
{% endhint %}

The **`Write Log Message`** block is available in [Page Flow](/app-editor/page-flow.md) and [Cloud Flow](/app-editor/cloud-flow.md) and operates in similar ways with some minor differences.

In Page Flow this block allows you to write messages into the browser's [web console](https://developer.chrome.com/docs/devtools/console/) log, whereas in Cloud Flow it writes a message into the Zingy's cloud logs, which can be accessed from the Cloud Flow tab in the [App Editor](/app-editor/app-editor-tour.md).&#x20;

<div align="left"><figure><img src="/files/knIgUAToMXRUK42co0oA" alt="" width="281"><figcaption><p>Write Log Message block</p></figcaption></figure></div>

The block consists of the following:

* *Message:* a [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that accepts a [*text*](/app-editor/page-flow/references/value-types.md) value for the message you want to log.
* *Category:* a [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that accepts a [*text*](/app-editor/page-flow/references/value-types.md) value that specifies the category of the message. This is useful for filtering out messages when conducting a post-mortem or [debugging](https://en.wikipedia.org/wiki/Debugging).
* *Level:* a [Value Parameter](/app-editor/page-flow/block-anatomy.md#value-parameters) that accepts a [*numeric*](/app-editor/page-flow/references/value-types.md) value  specifying the severity level of the message. This is only supported in Cloud Flow and is useful for further filtering out messages when conducting a post-mortem or [debugging](https://en.wikipedia.org/wiki/Debugging).

***

## Usage Example

The example below shows the Write Log Message block used when the a button is clicked. The message "The button was clicked" is written to the log.

<div align="left"><figure><img src="/files/zTPHT4oGZScxQyuiImCH" alt="" width="563"><figcaption><p>Example of Write Log Message block</p></figcaption></figure></div>

For the *Category* [value parameter](/app-editor/page-flow/block-anatomy.md#value-parameters), we use the [Log Category](/app-editor/page-flow/toolbox-blocks/log-category.md) block with the *INFO* category selected.&#x20;

{% hint style="success" %}
Note: You can provide your own categories and do not have to use the [Log Category](/app-editor/page-flow/toolbox-blocks/log-category.md) block.
{% endhint %}

This would produce a message similar to the one below:

```log
[LOG(info) 08/09/2023 16:49:01.760] The button was clicked
```


---

# 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.zingy.ai/app-editor/page-flow/toolbox-blocks/write-log-message.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.
