These v19 docs are archived 🔒.
Go to the
latest docs home
or try if
this exact page is available
in the latest docs.
Class ILogExtensions
Various extensions for ILog objects to add logs. They are all implemented as extension methods, so that they will not fail even if the log object is null.
[PublicApi]
public static class ILogExtensions
- Inheritance
-
objectILogExtensions
Methods
Try(ILog, Func<string>, string)
Special helper to use a function to create a message, but ignore any errors to avoid problems when only logging.
[InternalApi_DoNotUse_MayChangeWithoutNotice("will probably be moved elsewhere some day")]
public static string Try(this ILog log, Func<string> messageMaker, string errorMessage = null)
Parameters
log
ILogThe log object - not used, just for syntax
messageMaker
Func<string>Function to generate the message.
errorMessage
stringMessage to show if it fails