> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/log-to-console.md).

# Log to console

The Log to console action node prints a custom message to the [Logs panel](/reference/appfarm-client/developer-tools-for-apps.md#logs) of the [Developer tools](/reference/appfarm-client/developer-tools-for-apps.md).

## Usage

This action node is often used for debugging purposes in order to print a value from a data source or function.

If you want to log the contents of an object or data source to the console, you should use the function editor to turn it into a string. For example, `return JSON.stringify(variableName);`

{% hint style="info" %}
**Example**

A Log to console example is available in our [Showroom](https://showroom.appfarm.app/action-nodes/log-to-console). You can view the demo, as well as access the setup in Appfarm Create. Don't have access? [Register](https://showroom.appfarm.app/sign-up).
{% endhint %}

## Properties

<table><thead><tr><th width="163">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Text</strong></td><td><p>The message to print to the console. A message can be formed from:</p><ul><li>a static text string</li><li>a property value from a data binding</li><li>the result of a conditional expression</li><li>the return value of a function</li><li>other values such as the current date and time</li></ul></td></tr></tbody></table>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.appfarm.io/library/action-nodes/log-to-console.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
