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

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

```
GET https://docs.appfarm.io/library/action-nodes/log-to-console.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.
