Skip to content

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

public ActionLogger(Action<string, LogLevel> writeNoType, Action<string, Type, LogLevel> writeWithType, Action<Exception, string, LogLevel> writeNoTypeWithException, Action<Exception, string, Type, LogLevel> writeWithTypeAndException)

View source (opens in a new tab)

Summary: A logger where you pass in Action delegates that will be invoked when the Write methods are invoked.

Parameters

NameTypeDescription
writeNoTypeAction (opens in a new tab)A action which is called when the [Write](#Splat.ActionLogger.Write(System.String,Splat.LogLevel)) is called.
writeWithTypeAction (opens in a new tab)A action which is called when the [Write](# is called.
writeNoTypeWithExceptionAction (opens in a new tab)A action which is called when the [Write](# is called.
writeWithTypeAndExceptionAction (opens in a new tab)A action which is called when the [Write](# is called.

Remarks

Initializes a new instance of the ActionLogger class.