# Log objects

Log objects are useful for recording information for later reference. They have no side-effects. Carefully chosen log objects can massively simplify post-hoc debugging, especially (as we've found) when investigating merchant bug reports.

A log object is a plain JSON object, having the following structure:

```json
{
  "log": LOG_DETAILS
}
```

The log details can be any JSON value.

Log objects are most easily generated using the [**log tag**](/platform/liquid/tags/log.md).

Log objects appear wherever task run results are visible, including the task preview and when viewing an event.

<figure><img src="/files/3mzZfQ6SfNTnr6IEmE99" alt=""><figcaption><p>A log object visible in a task preview</p></figcaption></figure>

<figure><img src="/files/AWi5nUiE01m3xN5zrJ6q" alt=""><figcaption><p>A log object visible in a task run's result</p></figcaption></figure>


---

# 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://learn.mechanic.dev/core/tasks/code/log-objects.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.
