Log Formatting
Log Formatting
How you can format your logs will vary depending on which configuration you are using with Logging. The table below outlines the currently available configurations and the log formats which they support
Platform | JSON | Logfmt | NDJSON | Plaintext | Syslog (RFC 5424) |
---|---|---|---|---|---|
AWS Kinesis / CloudWatch | ✓ | ✓ | ✗ | ✓ | ✓ |
Clever Cloud | ✗ | ✗ | ✗ | ✗ | ✓ |
Gigalixir Log Drain | ✗ | ✗ | ✗ | ✓ | ✗ |
Heroku Log Drain | ✓ | ✓ | ✗ | ✓ | ✓ |
HTTP | ✓ | ✓ | ✓ | ✓ | ✓ |
Netlify | ✗ | ✗ | ✓ | ✗ | ✗ |
Scalingo | ✗ | ✗ | ✗ | ✗ | ✓ |
Syslog | ✓ | ✓ | ✗ | ✓ | ✓ |
When using Logfmt, JSON and NDJSON as your log format, you can add searchable attributes to your logs. Attributes can be any of the following types:
- string
- integer (e.g.
10
) - double (e.g.
10.01
) - boolean (
true
/false
)
Supported Log Formats
Plaintext
When specifying Plaintext as your log format, the log line will be used as the message as-is, and AppSignal will not parse attributes from the log line. If you want to have searchable attributes in your application's logs, we recommend formatting your logs in Logfmt, JSON and NDJSON.