# Write Log Message

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

Available in: Page Flow and Cloud Flow

Toolbox Category: Action - Log

Block Type: [Regular](https://docs.zingy.ai/app-editor/block-anatomy#regular-block)
{% endhint %}

The **`Write Log Message`** block is available in [Page Flow](https://docs.zingy.ai/app-editor/page-flow) and [Cloud Flow](https://docs.zingy.ai/app-editor/cloud-flow) 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](https://docs.zingy.ai/app-editor/app-editor-tour).&#x20;

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2F4dtmnXlChT21zmaKy0pb%2Fimage.png?alt=media&#x26;token=89422297-3da2-439c-a220-f87890bd4695" alt="" width="281"><figcaption><p>Write Log Message block</p></figcaption></figure></div>

The block consists of the following:

* *Message:* a [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value for the message you want to log.
* *Category:* a [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) 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](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*numeric*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) 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="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2F8ql8SEb7JsIRaq9oyfiB%2Fimage.png?alt=media&#x26;token=37e03e10-f997-4776-8437-5cd17300a19e" alt="" width="563"><figcaption><p>Example of Write Log Message block</p></figcaption></figure></div>

For the *Category* [value parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters), we use the [Log Category](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/log-category) 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](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/log-category) 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
```
