log.warn

Log a warning-level event with any BAML value.

Reference version

Signature

function log.warn(data: unknown, event_name: string | null = …) -> void throws never

Log a warning-level event with any BAML value.

The value is emitted unchanged as the log event's data. Pass a map for structured fields, or pass a string, number, bool, list, class instance, enum variant, or null to inspect that value directly. event_name labels the event; null or omitted still emits an unnamed log.

Source:<builtin>/log/log.bamlbytes 1223–1315