Skip to main content

Logging

Mission Control uses structured logging with named loggers and configurable log levels. Log levels can be set at startup via CLI flags or environment variables, and changed at runtime via the /debug/loggers API or system properties.

Log Levels

LevelValueDescription
silent10Suppress all logs
trace46Most verbose trace level
trace35Extra-detailed tracing
trace24Detailed tracing
trace13Basic tracing with extra detail
trace2Trace-level messages
debug1Debug messages
info0Informational messages (default)
warn-1Warnings
error-2Errors only
fatal-3Fatal errors that cause shutdown

The -v flag can also be used as a count to increase verbosity: -v = debug, -vv = trace, -vvv = trace1, etc.

CLI Flags

FlagDefaultDescription
--log-levelinfoSet the default log level
-vIncrease verbosity (repeatable)
--json-logsfalseOutput logs in JSON format
--colortrueEnable colored log output
--report-callerfalseInclude caller info in log messages

Changing Log Levels at Runtime

/debug/loggers API

The debug API allows you to view and temporarily change log levels without restarting the service.

info

On Mission Control, the /debug/loggers endpoint requires the monitor:update RBAC permission. On Canary Checker and Config DB, no RBAC is required.

List all loggers

curl http://localhost:8080/debug/loggers
{
"root": "info",
"http": "info",
"db": "info",
"jobs": "trace1",
"events": "info",
"notifications": "info"
}

Change a logger's level

curl -X POST http://localhost:8080/debug/loggers \
-d "logger=db" \
-d "level=debug"

Change level temporarily

Set the level for a specific duration, after which it reverts automatically:

curl -X POST http://localhost:8080/debug/loggers \
-d "logger=db" \
-d "level=trace" \
-d "duration=5m"
ParameterRequiredDescription
loggerYesName of the logger (e.g., root, db, http, jobs)
levelYesTarget level (trace, debug, info, warn, error)
durationNoGo duration (e.g., 5m, 1h, 30s). Level reverts after this period

System Properties

Log levels can also be changed via system properties, either in the database or via the /debug/property API:

curl -X POST http://localhost:8080/debug/property \
-d "name=log.level.db" \
-d "value=debug"
PropertyDefaultDescription
log.levelinfoRoot log level for all loggers
log.level.<name>Log level for a specific named logger
db.log.levelDatabase query logger level
log.jsonfalseEnable JSON log output
log.colortrueEnable colored log output
log.callerfalseInclude caller info
log.caller.<name>falseInclude caller info for specific logger

Named Loggers

Loggers are organized hierarchically by name. Setting the level on a parent logger affects all children unless overridden.

Common Loggers

These loggers are present in all services (Mission Control, Canary Checker, Config DB):

LoggerDescription
rootRoot logger, parent of all loggers
dbDatabase query logging
httpHTTP access logging
jobsBackground job execution
postqPostgres async queue processing
operatorKubernetes operator reconciliation

Mission Control

LoggerDescription
eventsEvent queue processing
notificationsNotification dispatch and delivery
notification.debug.traceDetailed notification tracing
authAuthentication and authorization
gitGit connector operations
viewView rendering
resourceSelectorResource selector query logging

Canary Checker

LoggerDescription
controllers.canaryCanary controller reconciliation
controllers.systemSystem controller reconciliation
Canary[namespace/name]Per-canary execution logging
Topology[name]Topology component lookup

Config DB

LoggerDescription
namespace/namePer-scraper execution logging
watch.nameKubernetes informer watching
watch[namespace/name]Incremental scraper watching
pyroscopeContinuous profiling integration

Access Logging

HTTP access logging is controlled via system properties:

PropertyDefaultDescription
access.logtrueEnable/disable access logging
access.log.debugfalseUse detailed pretty-print access logging
access.log.request.headertrueLog request headers
access.log.request.bodyfalseLog request bodies
access.log.response.bodyfalseLog response bodies
access.log.skip.sanitizefalseSkip secret sanitization in logs
access.log.colorstrueColored access log output
access.log.userAgentfalseInclude User-Agent in access logs
access.log.request.idfalseInclude request ID in access logs
access.log.spanIdtrueInclude span ID in access logs
access.log.traceIdtrueInclude trace ID in access logs
access.log.request.body.max2048Max request body size to log (bytes)
access.log.response.body.max8192Max response body size to log (bytes)

Access logging automatically skips /health and /metrics endpoints.

Other Debug Endpoints

EndpointMethodDescription
/debug/loggersGETList all named loggers and their levels
/debug/loggersPOSTChange a logger's level
/debug/propertiesGETList all supported properties
/debug/system/propertiesGETList current system property values
/debug/propertyPOSTSet a system property
/debug/routesGETList all registered HTTP routes
/debug/cronGETList all cron jobs and their schedules
/debug/cron/runPOSTTrigger a cron job immediately
/debug/pprof/*GETGo pprof profiling (localhost only)