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?)
⚠️ This is an internal API and can change at any time.
It's documented so you can understand how it works.
⚠️ Do not use it, or anything with
⚠️ Do not use it, or anything with
Sys
or Internal
namespaces in your code, as future changes could then break your code.
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