 | GlobalLogMethodInfo Method |
Logs a message with user or client information and returns the appropriate name.
If the user name is provided, it replaces a placeholder in the message with the user name,
logs the message, and returns the user name. If the user name is null or empty, it uses the client name instead.
Namespace:
Enerj.CDI.WebService.V4.Classes
Assembly:
Enerj.CDI.WebService.V4 (in Enerj.CDI.WebService.V4.dll) Version: 4.13.0.0 (4.13.0.0)
Syntaxpublic static string LogMethodInfo(
this IEnerjLog Logger,
string currentUserName,
string currentClientName,
string message
)
Parameters
- Logger
- Type: IEnerjLog
An instance of IEnerjLog used for logging the message. - currentUserName
- Type: SystemString
The name of the current user, or null/empty if not available. - currentClientName
- Type: SystemString
The name of the current client, used if the user name is not available. - message
- Type: SystemString
The log message, containing a placeholder to be replaced with user or client information.
Return Value
Type:
StringReturns the user name if provided, otherwise returns the client name.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnerjLog. 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).
See Also