 | 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
)
<ObsoleteAttribute("Instead use LogManager.Setup().SetupExtensions(). Marked obsolete with NLog v5.2")>
Public Shared Sub Register (
name As String,
func As Func(Of LogEventInfo, HttpContextBase, LoggingConfiguration, Object)
)
Dim name As String
Dim func As Func(Of LogEventInfo, HttpContextBase, LoggingConfiguration, Object)
AspNetLayoutRendererBase.Register(name, func)
[<ObsoleteAttribute("Instead use LogManager.Setup().SetupExtensions(). Marked obsolete with NLog v5.2")>]
static member Register :
name : string *
func : Func<LogEventInfo, HttpContextBase, LoggingConfiguration, Object> -> unit
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