Logger
This document describes the environment variables available for configuring log levels across ICC (Intelligent Command Center) services.
Overview
Section titled “Overview”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.
Environment Variables
Section titled “Environment Variables”Services with Configurable Log Levels
Section titled “Services with Configurable Log Levels”Service | Environment Variable | Default Value | Description |
---|---|---|---|
Main (API Gateway) | PLT_MAIN_LOGGER_LEVEL | warn | Controls logging for the main API gateway service |
Control Plane | PLT_CONTROL_PLANE_LOG_LEVEL | warn | Controls logging for Kubernetes integration and app management |
Cron | PLT_CRON_LOGGER_LEVEL | warn | Controls logging for scheduled job management |
Scaler | PLT_SCALER_LOGGER_LEVEL | warn | Controls logging for autoscaling operations |
Risk Service | PLT_RISK_SERVICE_LOGGER_LEVEL | warn | Controls logging for OpenTelemetry traces and risk assessment |
Risk Cold Storage | PLT_COLD_STORAGE_LOGGER_LEVEL | warn | Controls logging for cold storage operations |
Trafficante | PLT_TRAFFICANTE_LOGGER_LEVEL | warn | Controls logging for the trafficante service |
Available Log Levels
Section titled “Available Log Levels”The following log levels are supported, from least to most verbose:
fatal
- Only fatal errorserror
- Errors and abovewarn
- Warnings and above (default)info
- Informational messages and abovedebug
- Debug messages and abovetrace
- All messages including trace level
Usage Examples
Section titled “Usage Examples”Development Environment
Section titled “Development Environment”For verbose logging during development:
export PLT_MAIN_LOGGER_LEVEL=debugexport PLT_CONTROL_PLANE_LOG_LEVEL=debugexport PLT_SCALER_LOGGER_LEVEL=trace
Production Environment
Section titled “Production Environment”For minimal logging in production (default):
export PLT_MAIN_LOGGER_LEVEL=warnexport PLT_CONTROL_PLANE_LOG_LEVEL=warnexport PLT_CRON_LOGGER_LEVEL=warn
Debugging Specific Service
Section titled “Debugging Specific Service”To debug only the scaler service:
export PLT_SCALER_LOGGER_LEVEL=debug# Keep other services at warn level
Special Configurations
Section titled “Special Configurations”Health Check Route
Section titled “Health Check Route”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.
Best Practices
Section titled “Best Practices”- Production: Use
warn
orerror
levels to minimize log volume - Development: Use
info
ordebug
for better visibility - Debugging: Use
trace
for specific services when troubleshooting - Performance: Higher log levels (trace, debug) can impact performance; use sparingly in production