Log Server
The Log Server collects the logs from every service on a host into one place, keeps them in rotating files, and provides the recent log view shown in the dashboard.
Overview
Each service writes its own log, but the Log Server also gathers log entries from all the services on a host into a central, rotating set of files, and keeps a snapshot of recent entries that the dashboard shows. When the flow-analytics store is in use, it can also forward flow logs to it.
- Runs: Always, in practice. One per host, started early.
- Required: Effectively yes - without it, services cannot send their logs to the host's central log and the dashboard log view is empty.
- Depends on: NATS, local disk for the log files, and optionally the flow store for flow logs.
Configuration
The Log Server is configured under the logger namespace, which it shares with the application's own logging.
| Setting | Default | Description |
|---|---|---|
logger.fileLocation | ./log | The folder for the log files. |
logger.maxFileSizeInMegaBytes | 25 | The size a log file reaches before it rotates. |
logger.maxAgeInDays | 14 | How long rotated files are kept. |
logger.inMemoryLogSize | 1000 | How many recent lines are kept for the dashboard view. |
logger.port | 11000 | The port services send their logs to on the host. |
logger.sink | file | Where flow logs go: file, store, or both. |
The log folder must be writable by the user running the service. After changing settings in sbn-media.local.yaml, apply them with ./sbn-media config reload; changing the port or folder needs a restart.
FAQ
Where are the logs kept?
In logger.fileLocation, rotated by size and kept for logger.maxAgeInDays.
Why is the dashboard log view empty?
The Log Server provides the snapshot the dashboard shows - check that it is running.
How long are logs kept?
For logger.maxAgeInDays (14 by default). They are not removed otherwise.
Related pages
- SBN Media Overview (
SBN-Media/overview) - Installing and Configuring SBN Media (
SBN-Media/installation) - Log Analyzer (
SBN-Media/Platform/log-analyzer) - Watchdog (
SBN-Media/Platform/watchdog)