Skip to content
Commit Detail

Commit 00bdbe2

Author
Alex Robinson <arobinson@cloudflare.com> 2026-04-02 22:26:15 -0500
Parents
55fbbf3
Tree
2e24f94
Allow DurationExceededLogger to build its log message lazily

There have been a couple places in the code recently where we've wanted
to use DurationExceededLogger but to add additional fields into the log
message. Before this change, that required heap-allocating a string
before constructing the DurationExceededLogger and passing in a
StringPtr to it, but that's very wasteful given that most of the time
the log message is never even used.

This change adds a new DURATION_EXCEEDED_LOG macro that lazily
constructs the message to be logged only when it's needed.

Files changed