 | 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: 6.0.0+59339f2811712b446adf6dcd8a6bad39ad9f2ba1
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