Skip to content

Logging Configuration

qlog allows the user to set logging configuration for all services centrally within a Global helper. This opens up the full power of cloud logging to all Services.

Available globals include the following info. For full documentation on the available values for each field, see the qlog documentation here.

global:
  logging:
    configDir: "/tmp/"
    endpoints:
     - "fd://stdout"
    formatMode: "json"
    routings:
      DEFAULT: INFO
      InfoService: DEBUG

configDir

Variable Type Example Default
configDir string "/tmp" "/opt/kx/config"

Location that a generated configMap will be mounted to on your running pod container. Within the defined configDir a json file will be added, detailing the requesting qlog configuration.

endpoints

Variable Type Example Default
endpoints list [ ":fd://stdout" ] [ ":fd://stdout" ]

List of endpoints to pass to qlog. Logs will be written to each of the given endpoints. Using the default STDOUT endpoint is recommended.

formatMode

Variable Type Example Default
formatMode string "text" "json"

Desired logging format. This will be applied to all sub chart components. For machine-readable logs, using JSON is recommended.

routings

Variable Type Example Default
routings object {DEFAULT: "INFO", InfoService: "DEBUG"} {DEFAULT: "INFO"}

routings object takes Yaml key value pairs and allows user to define log levels for all components within the KX Insights Platform. For example the below routings configuration will set the InfoService component to DEBUG-level logging. The DEFAULT component is used to set the default level for all other components - set to INFO in this case.

If not set the default log routing sets all components to INFO.

  routings:
    DEFAULT: INFO
    InfoService: DEBUG  

Log samples

{"time":"2021-11-16T11:05:27.098z","component":"LOG","level":"INFO","message":"Loading src/pe.q"}
{"time":"2021-11-16T11:05:27.174z","component":"LOG","level":"INFO","message":"Loading src/timer.q"}
{"time":"2021-11-16T11:05:27.233z","component":"LOG","level":"INFO","message":"Loading src/event.q"}
{"time":"2021-11-16T11:05:27.282z","component":"LOG","level":"INFO","message":"KX Insights core extensions initialization complete"}
{"time":"2021-11-16T11:05:27.653z","component":"InfoService","level":"INFO","message":"Initialising Information Service"}
{"time":"2021-11-16T11:05:27.654z","component":"InfoService","level":"INFO","message":"Initializing Kubernetes Orchestration"}
{"time":"2021-11-16T11:05:27.654z","component":"InfoService","level":"DEBUG","message":"KUBERNETES HOST: 10.0.32.1"}
{"time":"2021-11-16T11:05:27.654z","component":"InfoService","level":"DEBUG","message":"POD_NAMESPACE: "}