-
Notifications
You must be signed in to change notification settings - Fork 0
net90_EventLogHelper.Interfaces_IEventLogWriter_WriteEntry
dparvin edited this page Sep 10, 2025
·
1 revision
Writes an entry directly to an existing EventLog instance.
public void WriteEntry(ref EventLog log, string message, EventLogEntryType eventType, int eventID,
short category, ref byte[] rawData)| parameter | description |
|---|---|
| log | The target EventLog instance. |
| message | The message to log. |
| eventType | The event type. |
| eventID | The event identifier. |
| category | The category number. |
| rawData | Optional binary data associated with the entry. |
- interface IEventLogWriter
- namespace EventLogHelper.Interfaces
- assembly EventLogHelper
Writes an entry to the specified event log using explicit log and source details.
public void WriteEntry(string machineName, string logName, string sourceName, string message,
EventLogEntryType eventType, int eventId, short category, byte[] rawData, int maxKilobytes,
int retentionDays, bool writeInitEntry)| parameter | description |
|---|---|
| machineName | The name of the machine where the log entry will be written. |
| logName | The name of the log to write to. |
| sourceName | The event source name (must already be registered with the log). |
| message | The message text to log. If too long, it will be truncated. |
| eventType | The event type (Information, Warning, Error, etc.). |
| eventId | Application-defined identifier for the event. |
| category | Application-defined category number for the event. |
| rawData | Optional binary data associated with the entry (can be Nothing). |
| maxKilobytes | Maximum log size in kilobytes. |
| retentionDays | Retention policy in days. |
| writeInitEntry | If True, an initialization entry is written if the log is first created. |
- interface IEventLogWriter
- namespace EventLogHelper.Interfaces
- assembly EventLogHelper