Table of Contents

Class ILog_Actions

Namespace
ToSic.Lib.Logging
Assembly
ToSic.Lib.Core.dll

Extension methods for Actions (functions which don't return a value).

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP")]
public static class ILog_Actions
Inheritance
ILog_Actions

Methods

Do(ILog, Action, bool, bool, string, string, string, int)

Run code / action and just log that it happened.

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, Action action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
action Action
timer bool
enabled bool
message string
cPath string

Code file path, auto-added by compiler

cName string

Code method name, auto-added by compiler

cLine int

Code line number, auto-added by compiler

Do(ILog, Action<ILogCall>, bool, bool, string, string, string, int)

Run code / action which expects the inner logger as parameter, for further logging.

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, Action<ILogCall> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
action Action<ILogCall>
timer bool
enabled bool
message string
cPath string

Code file path, auto-added by compiler

cName string

Code method name, auto-added by compiler

cLine int

Code line number, auto-added by compiler

Do(ILog, Func<string>, bool, bool, string, string, string, int)

Do something and the inner call can return a message which will be logged. The result of the inner call will just be logged. Ideal for calls which have a lot of logic and want to have a final message as to what case applied

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, Func<string> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
action Func<string>

The method called, whose return value will be logged but not passed on

timer bool
enabled bool
message string
cPath string

Code file path, auto-added by compiler

cName string

Code method name, auto-added by compiler

cLine int

Code line number, auto-added by compiler

Do(ILog, Func<ILogCall, string>, bool, bool, string, string, string, int)

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, Func<ILogCall, string> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
action Func<ILogCall, string>
timer bool
enabled bool
message string
cPath string
cName string
cLine int

Do(ILog, string, Action, bool, bool, string, string, string, int)

Run code / action and just log that it happened. This overload also accepts parameters to log and optional message.

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, string parameters, Action action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
parameters string
action Action
timer bool
enabled bool
message string
cPath string

Code file path, auto-added by compiler

cName string

Code method name, auto-added by compiler

cLine int

Code line number, auto-added by compiler

Do(ILog, string, Action<ILogCall>, bool, bool, string, string, string, int)

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, string parameters, Action<ILogCall> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
parameters string
action Action<ILogCall>
timer bool
enabled bool
message string
cPath string
cName string
cLine int

Do(ILog, string, Func<string>, bool, bool, string, string, string, int)

Do something and the inner call can return a message which will be logged. The result of the inner call will just be logged. Ideal for calls which have a lot of logic and want to have a final message as to what case applied

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, string parameters, Func<string> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
parameters string
action Func<string>

The method called, whose return value will be logged but not passed on

timer bool
enabled bool
message string
cPath string

Code file path, auto-added by compiler

cName string

Code method name, auto-added by compiler

cLine int

Code line number, auto-added by compiler

Do(ILog, string, Func<ILogCall, string>, bool, bool, string, string, string, int)

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still WIP but probably final")]
public static void Do(this ILog log, string parameters, Func<ILogCall, string> action, bool timer = false, bool enabled = true, string message = null, string cPath = null, string cName = null, int cLine = 0)

Parameters

log ILog
parameters string
action Func<ILogCall, string>
timer bool
enabled bool
message string
cPath string
cName string
cLine int