Skip to main content
Edge Server provides comprehensive logging capabilities to help with debugging, monitoring, and troubleshooting. You can control the verbosity of logs and where they are stored.

Basic Configuration

Add logging configuration to your YAML config file at the top-level root:

Configuration Structure

The logging configuration has two main sections:

ditto_sdk

Global logging level for all Ditto database resources. This controls the verbosity of SDK logs written to stderr.
Note: When retrieving log files, the level is permanently set to DEBUG regardless of this setting.

edge_server

Logging configuration for the Edge Server application itself.
Environment Variable Override: Setting EDGE_SERVER_LOG environment variable will override the level configured here.

Log Levels

The verbose log level can significantly impact performance due to the volume of log data generated. Use it only for debugging specific issues, not in production.
Available log levels from least to most verbose:

Rotating Log Files

You can configure Edge Server to automatically rotate log files based on time intervals. This is useful for managing log storage and archiving.

Rotating Logs Configuration

Log File Naming

The rotation frequency affects log file naming with timestamps:
  • Minute: <directory>/<prefix>.yyyy-MM-dd-HH-mm
  • Hour: <directory>/<prefix>.yyyy-MM-dd-HH
  • Day: <directory>/<prefix>.yyyy-MM-dd
  • Never: <directory>/<prefix> (no rotation)

Console Output Destinations

The console_logs field controls where console logs are written:

Configuration Examples

Production Configuration

Minimal logging for performance:

Development Configuration

Verbose logging with console output:

Production with Rotating Logs

Balanced logging with file rotation for production monitoring:

Troubleshooting Configuration

Maximum verbosity for debugging:

Docker Logs

To persist logs between container restarts, mount the persistence directory:

Best Practices

  1. Start with warning level: Use the default warning level for normal operation.
  2. Use debug for troubleshooting: When investigating issues, temporarily increase to debug level.
  3. Avoid verbose: The verbose level should only be used for short periods during debugging.
  4. Configure rotating logs for production: Use the rotating_logs configuration to manage log file sizes and retention.
  5. Centralize logs: In production, consider shipping logs to a centralized logging system for analysis.
  6. Use environment variables: Override log levels using the EDGE_SERVER_LOG environment variable for temporary debugging without config changes.