NLog.Targets.HTTP icon indicating copy to clipboard operation
NLog.Targets.HTTP copied to clipboard

Header value doesn't update dynamically.

Open jaanreinok opened this issue 3 years ago • 1 comments

The header value doesn't update. Layout value gets updated. This would be useful in case of supplying metadata via header. The http target has BatchAsJsonArray="true" wrapped in BufferingWrapper. custom layout render. LayoutRenderer.Register("unixutcms", (logEvent) => DateTimeOffset.UtcNow.ToUnixTimeMilliseconds());

<header name="ClientUtcNowMs" value="${unixutcms}"/> <layout type="JsonLayout" > <attribute name="ts" layout="${unixutcms}" /> ...

jaanreinok avatar Feb 15 '22 12:02 jaanreinok

Relentless ... Layout renderers everywhere, huh? I will see what can be done, but no promises.

DarekDan avatar Feb 16 '22 00:02 DarekDan