Skip to content

net90_EventLogHelper_SmartEventLogger_Log

dparvin edited this page Oct 2, 2025 · 6 revisions

SmartEventLogger.Log method (1 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (2 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, byte[] rawData)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (3 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (4 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (5 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string source, string message)
parameter description
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (6 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, byte[] rawData, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (7 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, byte[] rawData)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (8 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (9 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (10 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, int maxKilobytes, int retentionDays)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (11 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (12 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string source, string message, LoggingSeverity EntrySeverity)
parameter description
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (13 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (14 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, byte[] rawData, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (15 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, byte[] rawData)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (16 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int maxKilobytes, 
    int retentionDays)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (17 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (18 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (19 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, int maxKilobytes, int retentionDays, bool writeInitEntry)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (20 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, int maxKilobytes, int retentionDays, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (21 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (22 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, 
    LoggingSeverity EntrySeverity)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (23 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (24 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (25 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, byte[] rawData, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (26 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int maxKilobytes, 
    int retentionDays, bool writeInitEntry)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (27 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, int maxKilobytes, 
    int retentionDays)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (28 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int maxKilobytes, 
    int retentionDays, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (29 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (30 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (31 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, int maxKilobytes, int retentionDays, bool writeInitEntry, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (32 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    LoggingSeverity EntrySeverity)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (33 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (34 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (35 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (36 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int maxKilobytes, 
    int retentionDays, bool writeInitEntry, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (37 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, int maxKilobytes, 
    int retentionDays, bool writeInitEntry)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (38 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, int maxKilobytes, 
    int retentionDays, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (39 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (40 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    int maxKilobytes, int retentionDays)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (41 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (42 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category, LoggingSeverity EntrySeverity)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (43 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (44 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID, short category)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (45 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, int maxKilobytes, 
    int retentionDays, bool writeInitEntry, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (46 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData, int maxKilobytes, int retentionDays)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (47 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    int maxKilobytes, int retentionDays, bool writeInitEntry)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (48 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    int maxKilobytes, int retentionDays, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (49 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData, LoggingSeverity EntrySeverity)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (50 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string source, string message, EventLogEntryType eventType, 
    int eventID, short category, byte[] rawData)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (51 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID, short category, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (52 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData, int maxKilobytes, int retentionDays, bool writeInitEntry)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (53 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData, int maxKilobytes, int retentionDays, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (54 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    int maxKilobytes, int retentionDays, bool writeInitEntry, LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (55 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string source, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData, int maxKilobytes, int retentionDays)
parameter description
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (56 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string source, string message, EventLogEntryType eventType, 
    int eventID, short category, byte[] rawData, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (57 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (58 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string message, EventLogEntryType eventType, int eventID, short category, 
    byte[] rawData, int maxKilobytes, int retentionDays, bool writeInitEntry, 
    LoggingSeverity EntrySeverity)
parameter description
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (59 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData, int maxKilobytes, int retentionDays, bool writeInitEntry)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (60 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string source, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData, int maxKilobytes, int retentionDays, 
    LoggingSeverity EntrySeverity)
parameter description
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (61 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string source, string message, EventLogEntryType eventType, 
    int eventID, short category, byte[] rawData, int maxKilobytes, int retentionDays)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (62 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (63 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, 
    LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (64 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string sourceName, string message, EventLogEntryType eventType, int eventID, 
    short category, byte[] rawData, int maxKilobytes, int retentionDays, bool writeInitEntry, 
    LoggingSeverity EntrySeverity)
parameter description
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (65 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes, 
    int retentionDays, bool writeInitEntry)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (66 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string source, string message, EventLogEntryType eventType, 
    int eventID, short category, byte[] rawData, int maxKilobytes, int retentionDays, 
    LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (67 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes, 
    int retentionDays)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (68 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes, 
    LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (69 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string logName, string sourceName, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes, 
    int retentionDays, bool writeInitEntry, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
sourceName The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
writeInitEntry Indicates whether an initialization entry should be written when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (70 of 72)

Writes an entry (or entries) to the Windows Event Log using the specified parameters.

public static void Log(string targetMachineName, string targetLogName, string sourceName, 
    string message, EventLogEntryType eventType, int eventID, short category, byte[] rawData, 
    int maxKilobytes, int retentionDays, bool writeInitEntry)
parameter description
targetMachineName The name of the machine where the event log resides. Use "." for the local machine. If null or empty, the local machine is used by default, or the value of the MachineName property if set.
targetLogName The name of the event log (e.g., "Application", "System", or a custom log name). If null or empty, the value of the LogName property is used.
sourceName The source name for the event entry. If null or empty, a source is auto-generated from the calling method's namespace, class, and method name. If the resulting name exceeds 254 characters, it will be truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier. Application-defined and useful for grouping related events.
category The category ID for the event. Use 0 if not applicable.
rawData Optional binary data to associate with the event. Can be null.
maxKilobytes The maximum size of the event log in kilobytes. Only applies when creating a new log. Range: 64 KB � 4 GB.
retentionDays The number of days entries should be retained. 0 means entries are kept indefinitely. Applies only when creating a new log.
writeInitEntry Whether to write an initialization entry when a new log is created.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (71 of 72)

Writes an entry to the Windows Event Log using the provided parameters.

public static void Log(string machineName, string logName, string source, string message, 
    EventLogEntryType eventType, int eventID, short category, byte[] rawData, int maxKilobytes, 
    int retentionDays, LoggingSeverity EntrySeverity)
parameter description
logName The name of the event log to write to (e.g., "Application", "System", or a custom log name). If null or empty, "Application" is used by default.
source The source of the log entry. If null or empty, a default source is generated using the calling method's namespace, class, and method name. If the source exceeds 254 characters, it is automatically truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier for the log entry. This is application-defined and may be used to group similar events.
category The category for the event, if applicable. This is typically used in categorized event views.
rawData Optional binary data to include with the log entry. Can be null if not used.
maxKilobytes The maximum size of the event log in kilobytes. Only used when creating a new log. Must be between 64 KB and 4 GB. If 0 or negative, the system default is used.
retentionDays The number of days to retain event log entries. If 0, events are retained indefinitely. Only used when creating a new log.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also


SmartEventLogger.Log method (72 of 72)

Writes an entry (or entries) to the Windows Event Log using the specified parameters.

public static void Log(string targetMachineName, string targetLogName, string sourceName, 
    string message, EventLogEntryType eventType, int eventID, short category, byte[] rawData, 
    int maxKilobytes, int retentionDays, bool writeInitEntry, LoggingSeverity EntrySeverity)
parameter description
targetMachineName The name of the machine where the event log resides. Use "." for the local machine. If null or empty, the local machine is used by default, or the value of the MachineName property if set.
targetLogName The name of the event log (e.g., "Application", "System", or a custom log name). If null or empty, the value of the LogName property is used.
sourceName The source name for the event entry. If null or empty, a source is auto-generated from the calling method's namespace, class, and method name. If the resulting name exceeds 254 characters, it will be truncated.
message The message to log. If null or empty, a default message is used. If AllowMultiEntryMessages is false (default), messages longer than 32,766 characters are truncated and suffixed with the TruncationMarker (e.g., "... [TRUNCATED]"). If AllowMultiEntryMessages is true, long messages are split into multiple event entries, each prefixed with part information (e.g., [Part 1/3]) and intermediate entries are suffixed with the ContinuationMarker (e.g., " ...") to indicate continuation.
eventType The type of event. Valid values are Error, Warning, and Information. If invalid, Information is used.
eventID The numeric event identifier. Application-defined and useful for grouping related events.
category The category ID for the event. Use 0 if not applicable.
rawData Optional binary data to associate with the event. Can be null.
maxKilobytes The maximum size of the event log in kilobytes. Only applies when creating a new log. Range: 64 KB � 4 GB.
retentionDays The number of days entries should be retained. 0 means entries are kept indefinitely. Applies only when creating a new log.
writeInitEntry Whether to write an initialization entry when a new log is created.
EntrySeverity Indicates the importance or severity of this log entry relative to the configured logging threshold (CurrentLoggingLevel). If the severity is lower than the current logging level, the entry will be skipped and not written to the Event Log.

Remarks

If the specified event log or source does not exist, they are created automatically using the provided parameters.

This method handles safe formatting, validation, and optional message splitting to avoid truncation of diagnostic content.

See Also

Clone this wiki locally