Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document json format #3313

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/collecting-container-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

<!-- TOC -->

- [Collecting Container Logs](#collecting-container-logs)
- [Configuration](#configuration)
- [Multiline log parsing](#multiline-log-parsing)
- [Conditional multiline log parsing](#conditional-multiline-log-parsing)
- [Log format](#log-format)
- [json log format](#json-log-format)
- [fields log format](#fields-log-format)
- [json_merge log format](#json_merge-log-format)
- [text log format](#text-log-format)
- [Problem](#problem)
- [Resolution](#resolution)
- [Setting source name and other built-in metadata](#setting-source-name-and-other-built-in-metadata)
- [Filtering](#filtering)
- [Modifying log records](#modifying-log-records)
- [Adding custom fields](#adding-custom-fields)
- [Persistence](#persistence)
- [Advanced Configuration](#advanced-configuration)
- [Direct configuration](#direct-configuration)
- [Disabling container logs](#disabling-container-logs)
- [Using OTLP Source](#using-otlp-source)

<!-- /TOC -->

By default, log collection is enabled. This includes both container logs and systemd logs. This document covers container logs.
Expand Down Expand Up @@ -138,6 +159,12 @@ We're going to demonstrate the differences between them on two example log lines
{ "log_property": "value", "text": "I am a json log" }
```

#### `json` log format

`json` log format is an alias for `fields` log format.

See [`fields` log format](#fields-log-format)

#### `fields` log format

Logs formatted as `fields` are wrapped in a JSON object with additional properties, with the log body residing under the `log` key.
Expand Down
Loading