Click or drag to resize

LayoutRendererRegister Method (String, FuncLogEventInfo, LoggingConfiguration, Object)

Note: This API is now obsolete.

Register a custom layout renderer with a callback function func. The callback receives the logEvent and the current configuration.

Namespace:  NLog.LayoutRenderers
Assembly:  NLog (in NLog.dll) Version: 5.2.0+eed5f76d158dbcaef9326f7a0e1c281adad171e8
Syntax
[ObsoleteAttribute("Instead use LogManager.Setup().SetupExtensions(). Marked obsolete with NLog v5.2")]
public static void Register(
	string name,
	Func<LogEventInfo, LoggingConfiguration, Object> func
)

Parameters

name
Type: SystemString
The layout-renderer type-alias for use in NLog configuration - without '${ }'
func
Type: SystemFuncLogEventInfo, LoggingConfiguration, Object
Callback that returns the value for the layout renderer.
See Also