Message_templates.Runtime_helpersRuntime type conversions using Obj module introspection
This module provides runtime type conversions between OCaml values and JSON representations. All template variables use the generic conversion functions which inspect values at runtime using the Obj module.
Extract string value from Yojson.t, converting if necessary
Render a template by replacing {var} placeholders with values from properties
Generic value to string conversion using Obj module. This is used as a fallback when type information is not available at compile time. NOTE: Uses Obj for runtime type inspection. For production use, prefer explicit type annotations.
Generic value to JSON conversion. This is a best-effort conversion for unknown types.
Get current timestamp as RFC3339 string - optimized for frequent calls
val format_sink_template : string -> Log_event.t -> stringFormat a template string for sink output. Replaces {timestamp}, {level}, and {message} placeholders.