Skip to content

Logger

This document describes the environment variables available for configuring log levels across ICC (Intelligent Command Center) services.

ICC uses environment variables to control logging verbosity for individual microservices. Each service can have its own log level, allowing fine-grained control over logging output in different environments.

ServiceEnvironment VariableDefault ValueDescription
Main (API Gateway)PLT_MAIN_LOGGER_LEVELwarnControls logging for the main API gateway service
Control PlanePLT_CONTROL_PLANE_LOG_LEVELwarnControls logging for Kubernetes integration and app management
CronPLT_CRON_LOGGER_LEVELwarnControls logging for scheduled job management
ScalerPLT_SCALER_LOGGER_LEVELwarnControls logging for autoscaling operations
Risk ServicePLT_RISK_SERVICE_LOGGER_LEVELwarnControls logging for OpenTelemetry traces and risk assessment
Risk Cold StoragePLT_COLD_STORAGE_LOGGER_LEVELwarnControls logging for cold storage operations
TrafficantePLT_TRAFFICANTE_LOGGER_LEVELwarnControls logging for the trafficante service

The following log levels are supported, from least to most verbose:

  • fatal - Only fatal errors
  • error - Errors and above
  • warn - Warnings and above (default)
  • info - Informational messages and above
  • debug - Debug messages and above
  • trace - All messages including trace level

For verbose logging during development:

Terminal window
export PLT_MAIN_LOGGER_LEVEL=debug
export PLT_CONTROL_PLANE_LOG_LEVEL=debug
export PLT_SCALER_LOGGER_LEVEL=trace

For minimal logging in production (default):

Terminal window
export PLT_MAIN_LOGGER_LEVEL=warn
export PLT_CONTROL_PLANE_LOG_LEVEL=warn
export PLT_CRON_LOGGER_LEVEL=warn

To debug only the scaler service:

Terminal window
export PLT_SCALER_LOGGER_LEVEL=debug
# Keep other services at warn level

The main service has a special configuration for the health check route (/health) that sets its log level to error to prevent health check requests from cluttering the logs.

  1. Production: Use warn or error levels to minimize log volume
  2. Development: Use info or debug for better visibility
  3. Debugging: Use trace for specific services when troubleshooting
  4. Performance: Higher log levels (trace, debug) can impact performance; use sparingly in production