Log Formats

Configure structured log output for self-hosted containers.

Deepgram self-hosted containers support four log output formats. Use the --log-format CLI flag to select the format that best fits your logging infrastructure.

This flag applies to all self-hosted container images: API, Engine, License Proxy, and Billing.

Available Formats

FormatFlagDescription
Full--log-format=fullDefault. Verbose output with all fields, timestamps, and span context. Best for development and debugging.
Compact--log-format=compactAbbreviated output. Omits redundant span context for more concise logs.
Pretty--log-format=prettyHuman-readable output with color highlighting. Best for local development.
Json--log-format=jsonStructured JSON output. Best for log aggregation systems (i.e. Datadog, Splunk, ELK).

Configuration

The log format is set as a CLI flag appended to the container’s command. It is not configured via TOML.

Docker Compose

1services:
2 api:
3 image: quay.io/deepgram/self-hosted-api:release-260319
4 command: -v serve /api.toml --log-format=json
5 # ...
6
7 engine:
8 image: quay.io/deepgram/self-hosted-engine:release-260319
9 command: -v serve /engine.toml --log-format=json
10 # ...
11
12 license-proxy:
13 image: quay.io/deepgram/self-hosted-license-proxy:release-260319
14 command: -v serve /license-proxy.toml --log-format=json
15 # ...

Kubernetes (Helm)

In a Helm values override, set the command args for each container:

1api:
2 additionalArgs: ["--log-format=json"]
3
4engine:
5 additionalArgs: ["--log-format=json"]
6
7licenseProxy:
8 additionalArgs: ["--log-format=json"]
9
10billing:
11 additionalArgs: ["--log-format=json"]

The API container also accepts a legacy --json flag for JSON output. If both --json and --log-format are specified, --log-format takes precedence.

Example Output

Full (default)

2026-03-19T14:30:00.123456Z INFO serve: deepgram::server: Starting API server host=0.0.0.0 port=8080
2026-03-19T14:30:00.234567Z INFO serve: deepgram::license: License validated successfully expires=2027-09-19T00:00:00Z
2026-03-19T14:30:01.345678Z INFO serve: deepgram::engine: Engine connection established endpoint=engine:9991

Compact

2026-03-19T14:30:00.123456Z INFO serve: Starting API server host=0.0.0.0 port=8080
2026-03-19T14:30:00.234567Z INFO serve: License validated expires=2027-09-19T00:00:00Z
2026-03-19T14:30:01.345678Z INFO serve: Engine connected endpoint=engine:9991

Pretty

2026-03-19T14:30:00.123456Z INFO serve: Starting API server
host: 0.0.0.0
port: 8080
2026-03-19T14:30:00.234567Z INFO serve: License validated successfully
expires: 2027-09-19T00:00:00Z

Json

1{"timestamp":"2026-03-19T14:30:00.123456Z","level":"INFO","target":"deepgram::server","message":"Starting API server","host":"0.0.0.0","port":8080}
2{"timestamp":"2026-03-19T14:30:00.234567Z","level":"INFO","target":"deepgram::license","message":"License validated successfully","expires":"2027-09-19T00:00:00Z"}
3{"timestamp":"2026-03-19T14:30:01.345678Z","level":"INFO","target":"deepgram::engine","message":"Engine connection established","endpoint":"engine:9991"}

Availability

The --log-format flag is available in release 260319 and later on all self-hosted container images.


What’s Next