[This is preliminary documentation and is subject to change.]
Precalculates the layout for the specified log event and stores the result
in per-log event cache.
Namespace:
NLog.LayoutsAssembly: NLog (in NLog.dll) Version: 2.0.1.0
Syntax
C# |
---|
public virtual void Precalculate( LogEventInfo logEvent ) |
Visual Basic (Declaration) |
---|
Public Overridable Sub Precalculate ( _ logEvent As LogEventInfo _ ) |
Visual Basic (Usage) |
---|
Dim instance As Layout Dim logEvent As LogEventInfo instance.Precalculate(logEvent) |
Parameters
- logEvent
- Type: NLog..::.LogEventInfo
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.