Click or drag to resize

LayoutPrecalculate Method

Precalculates the layout for the specified log event and stores the result in per-log event cache. Only if the layout doesn't have [ThreadAgnostic] and doesn't contain layouts with [ThreadAgnostic].

Namespace:  NLog.Layouts
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
public virtual void Precalculate(
	LogEventInfo logEvent
)

Parameters

logEvent
Type: NLogLogEventInfo
The log event.
Remarks
Calling this method enables you to store the log event in a buffer and/or potentially evaluate it in another thread even though the layout may contain thread-dependent renderer.
See Also