[Yandex Cloud documentation](../../index.md) > [Yandex Serverless Containers](../index.md) > [Concepts](index.md) > Container logs

# Container logs

A container writes logs to Yandex Cloud Logging, to the [default log group](../../logging/concepts/log-group.md) for the folder where the container is located.

There are two types of logs:
* Automatic: Logs of requests to containers.
* Custom: Logs that custom code writes to the standard output (`stdout`) and standard error output (`stderr`). The minimum logging level of custom logs is `UNSPECIFIED`.

Learn more about working with logs in the [Yandex Cloud Logging documentation](../../logging/index.md).

## Structured logs {#structured-logs}

Apart from text, you can write structured logs in the following JSON format to the standard output (`stdout`) and standard error output (`stderr`):

* `message/msg`: Entry text.
* `level`: Logging level. The available levels are `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, and `FATAL`.
* `stream_name`: Log stream name. It must be from 1 to 63 characters long.

All other JSON fields are automatically written to `json-payload`.

A log must be single-line. Any entry that contains the `message/msg` field and is up to 64 KB is considered a structured log. If a log entry is too large, it is split into multiple entries and treated as text.

You can disable structured logs by setting `STRUCTURED_LOGGING = false`. In this case, any JSON log will be considered plain text.

Structured logging can be used for [concurrent container instance calls](container.md#concurrency) to log the IDs of all calls processed by the container, not just the most recent one. To do this, specify a unique call ID in the `request_id` field. In `HTTP server` [operation mode](container.md#runtime), it is passed to the container in the `X-Request-Id` header.

## Useful links {#see-also}

* [Writing information to the execution log. Application and Dockerfile examples.](../operations/logs-write.md)