Skip to main content

Module logging

Module logging 

Source
Expand description

Tracing initialization with module and build-variant tags on every JSON log line.

In CloudWatch / non-TTY environments the server emits one JSON object per log event. Every JSON event begins with two compile-time attributes:

  1. "bge_module" — always "server". Lets operators distinguish this service from the router or other BGE-family processes in shared log groups.
  2. "build" — "cpu" for the default MLAS image, "cuda" whenever the cuda or tensorrt features are enabled (both are turned on by Dockerfile.cuda). Use this in CloudWatch Insights to filter a mixed CPU/CUDA fleet.

The formatter chain is PrependModule → PrependBuild → JSON formatter, so the rendered line always starts with {"bge_module":"server","build":"<variant>",…}.

The human-readable text / pretty formats used during local dev are left unchanged.

Structs§

PrependBuild
Wraps a JSON [FormatEvent] so the rendered object always begins with a "build" key.
PrependModule
Wraps a JSON [FormatEvent] so the rendered object always begins with a "bge_module" key (value: the compile-time BGE_MODULE constant).

Constants§

BGE_MODULE
Compile-time service name included as the first key on every JSON log line.
BUILD_VARIANT
Compile-time identifier for the build of the server that is running.

Functions§

init
Initialize the global tracing subscriber.