Click or drag to resize

LoggerExtensionsInvoked Method

Logs "TypeName.MemberName(): Invoked. details" with the given level and, in debug builds, writes it with a time stamp to the debug output.

Namespace: RAYLASE.Shared
Assembly: RAYLASE.Shared (in RAYLASE.Shared.dll) Version: 2.58.0
Syntax
C#
public static void Invoked(
	this ILogger logger,
	string typeName,
	string details = null,
	LoggingLevel level = LoggingLevel.Trace,
	string memberName = ""
)

Parameters

logger  ILogger
The logger; may be .
typeName  String
The name of the calling type, to be passed as nameof( Type ).
details  String  (Optional)
Optional details appended to the message.
level  LoggingLevel  (Optional)
The log level.
memberName  String  (Optional)
The name of the calling member; filled in by the compiler.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILogger. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The type and member names are compile-time constants (nameof and CallerMemberNameAttribute), so they survive obfuscation, in contrast to the call site determined by the logging framework at runtime. The message is only built if the level is enabled or in debug builds.
See Also