Windows NT only Provides for logging a user-defined event in the Windows NT Event Log from within Adaptive Server.
xp_logevent error_number, message[, type]
is the user-assigned error number. It must be equal to or greater than 50000.
is the text of the message that is displayed in the description field of the event viewer. The maximum length of the message is 255 bytes. Enclose the message in quotes.
describes the urgency of the event. Values are informational, warning, and error. The default is informational. Enclose the value in quotes.
An informational event, number 55555, will be logged in the Windows NT Event Log. The text of the description in the event detail window is “Email message deleted”:
xp_logevent 55555, 'Email message deleted.'
An error event, number 66666, will be logged in the Windows NT Event Log. The text of the description in the event detail window is “DLL not found”:
xp_logevent 66666, 'DLL not found.', 'error'
The following table describes the default event details for events generated with xp_logevent:
Detail |
Value |
---|---|
User |
N/A |
Computer |
Name of machine running XP Server |
Event ID |
12 |
Source |
Name of Adaptive Server |
Category |
User |
Only a System Administrator can execute xp_logevent.