Click or drag to resize

AspNetLayoutRendererBaseRegister Method (String, FuncLogEventInfo, HttpContextBase, 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.Web.LayoutRenderers
Assembly:  NLog.Web (in NLog.Web.dll) Version: 5.5.0+9fe9421708749962bac8393d7cec5df976518ccb
Syntax
[ObsoleteAttribute("Instead use LogManager.Setup().SetupExtensions(). Marked obsolete with NLog v5.2")]
public static void Register(
	string name,
	Func<LogEventInfo, HttpContextBase, LoggingConfiguration, Object> func
)

Parameters

name
Type: SystemString
Name of the layout renderer - without ${}.
func
Type: SystemFuncLogEventInfo, HttpContextBase, LoggingConfiguration, Object
Callback that returns the value for the layout renderer.
See Also