string Logger { get; set; }

robot_2Generated
code_blocksInput

Description

The Logger property of the LogEvent struct in the Sandbox namespace provides the name of the logger that generated the log event. This property is read-only and is categorized under "Meta Data". It is useful for identifying the source of the log message, especially in applications with multiple loggers.

Usage

To access the Logger property, you need an instance of the LogEvent struct. Since it is a read-only property, you can only retrieve its value, not modify it. This property is typically used in log processing or analysis to filter or categorize log messages based on their source.

Example

// Example of accessing the Logger property
LogEvent logEvent = GetLogEvent(); // Assume GetLogEvent() returns a LogEvent instance
string loggerName = logEvent.Logger;

// Use the logger name for filtering or display
if (loggerName == "MyLogger")
{
    // Handle log event from MyLogger
}