Creates an entry with the given message text, application-defined event identifier, and application-defined category for the event log, using the specified event source. The can be used by the Event Viewer to filter events in the log.
Syntax
'Declaration
Public Function New( _
ByVal As String, _
ByVal As String, _
ByVal As LogEntryType, _
ByVal As Integer, _
ByVal As Short _
)
'Usage
Dim source As String
Dim message As String
Dim entryType As LogEntryType
Dim eventId As Integer
Dim category As Short
Dim instance As New LogEntryEventArgs(source, message, entryType, eventId, category)
public LogEntryEventArgs(
string ,
string ,
LogEntryType ,
int ,
short
)
public:
LogEntryEventArgs(
String^ ,
String^ ,
LogEntryType ,
int ,
short
)
Parameters
- source
- The application event source.
- message
- The string to write to the event log.
- entryType
- One of the LogEntryType values.
- eventId
- The application-specific identifier for the event.
- category
- The application-specific subcategory associated with the message.
Requirements
Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows
See Also