Logging
Releval logs through the standard ASP.NET Core logging framework,
so these settings follow the conventional .NET Logging configuration.
Log output is written to the container's standard output (stdout), where your container runtime
or orchestrator collects it - via docker logs, a Docker logging driver, or a platform such as
Kubernetes.
Releval does not write log files of its own, so forwarding logs to a file or a central aggregator
is the job of that surrounding layer, not a Releval setting.
Two things are usually worth configuring: how much is logged, and in what format.
Logging format
The format is set by the console formatter - readable plain text by default, or structured JSON when you want a log aggregator to parse each entry:
- Environment Variable
- appsettings.json
environment:
- Logging__Console__FormatterName=json
{
"Logging": {
"Console": {
"FormatterName": "json"
}
}
}
Log levels
Log verbosity is set per category using the levels below.
| Variable | Default | Description |
|---|---|---|
Logging__LogLevel__Default | Warning | Default log level |
Logging__LogLevel__Microsoft.AspNetCore | Warning | Web framework logs |
Logging__LogLevel__Microsoft.EntityFrameworkCore | Warning | Database query logs |
Supported log levels, from low to high:
TraceDebugInformationWarningErrorCritical
- Environment Variable
- appsettings.json
environment:
- Logging__LogLevel__Default=Warning
- Logging__LogLevel__Microsoft.AspNetCore=Warning
{
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft.AspNetCore": "Warning"
}
}
}