jx logging

July 11, 2025 ยท View on GitHub

Go Report Card Downloads

A simple logging wrapper around logrus used in all JX components. The aim is to have a single place to configure log formats and levels.

Configuration

Configuration can be done with the following environment variables.

VariableOptionsDefault
JX_LOG_LEVELtrace, debug, info, warninfo
JX_LOG_FORMATtext, json, stackdriver, extendedtext
JX_LOG_FILEa location to send debug logs to
JX_LOG_SERVICEthe service name (stackdriver only)
JX_LOG_SERVICE_VERSIONthe service version (stackdriver only)
JX_LOG_STACK_SKIPthe comma separated stack frames to skip in the logs (stackdriver only)

Formats

FormatDescription
jsonStandard logrus JSON layout
textCustom colorful Jenkins X layout
stackdriverCustom formatter for stackdriver
extendedStandard logrus text layout. Notably it shows fields, which text doesn't