 | TargetLayoutWithLock Property |
Note: This API is now obsolete.
NLog Layout are by default threadsafe, so multiple threads can be rendering logevents at the same time.
This ensure high concurrency with no lock-congestion for the application-threads, especially when using
AsyncTargetWrapper
or AsyncTaskTarget.
But if using custom
Layout or
LayoutRenderer that are not
threadsafe, then this option can enabled to protect against thread-concurrency-issues. Allowing one
to update to NLog 5.0 without having to fix custom/external layout-dependencies.
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 5.2.0+eed5f76d158dbcaef9326f7a0e1c281adad171e8
Syntax[ObsoleteAttribute("Temporary workaround for broken Layout Renderers that are not threadsafe. Marked obsolete on NLog 5.0")]
public bool LayoutWithLock { get; set; }
<ObsoleteAttribute("Temporary workaround for broken Layout Renderers that are not threadsafe. Marked obsolete on NLog 5.0")>
Public Property LayoutWithLock As Boolean
Get
Set
Dim instance As Target
Dim value As Boolean
value = instance.LayoutWithLock
instance.LayoutWithLock = value
[<ObsoleteAttribute("Temporary workaround for broken Layout Renderers that are not threadsafe. Marked obsolete on NLog 5.0")>]
member LayoutWithLock : bool with get, set
Property Value
Type:
Boolean
See Also