> ## Documentation Index
> Fetch the complete documentation index at: https://docs.restate.dev/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.restate.dev/feedback

```json
{
  "path": "/server/monitoring/logging",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Logging

> Configure logging for Restate Server.

By default, Restate logs INFO, WARN and ERROR events using a pretty format.

## Log filter

You can modify the filter used for log events setting the [configuration entry](/server/configuration) `log-filter`, or alternatively setting the `RUST_LOG` environment variable. Check the [`RUST_LOG` documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html) for more details about the filter format. For example to enable debug logs on all Restate components, and info on other logs, set the filter as `info,restate=debug`. See the paragraph below [components and log events](#components-and-log-event-context-fields) for more details about filter targets.

## Log format

You can modify the log format by setting the [configuration entry](/server/configuration) `log-format` (or via `restate-server --log-format=<FORMAT>`) as follows:

* `pretty`: Very verbose pretty format with rendered error descriptions, when available
* `compact`: Compact single line format
* `json`: Newline delimited json format

## Components and log event context fields

The following components are producing relevant logs:

* `restate_ingress_http`: The Restate component ingesting HTTP requests
* `restate_admin`: The component responsible for holding the metadata information and executing service discovery
* `restate_invoker`: The component interacting with deployed service deployments
* `restate_worker::partition::state_machine`: The state machine effects
* `restate_partition_store`: Restate partition storage layer
* `restate_bifrost`: Restate durable log layer
* `hyper`: The HTTP library

Most log events generated by Restate will also have the following attached attributes:

* `rpc.service`: The related service
* `rpc.method`: The related method
* `restate.invocation.id`: The [invocation identifier](/services/invocation/http#invocation-identifier)

## Recommendations

When testing Restate locally, we recommend keeping the default configuration.

When deploying in production, we recommend setting the log level to `info` and enabling the `json` format in conjunction with a log collector, so you can later inspect and filter logs based on its event fields.

We recommend to set up logging to a more verbose filter, and use the `pretty` format. Some example filters:

* `info,restate_ingress_http=trace,restate_invoker=trace,restate=debug,hyper=debug` for network related issues
* `info,restate_worker::partition::effects=debug` to get insights on the state machine effects
* `info,restate_admin=trace` to check service discovery and registration
