EVENTLOGNot in LE
Print Topic  Return to Overview  Previous Topic  Next Topic 
Purpose:Write a string to the Windows event log.

 

Format:EVENTLOG [/Cn /E /I /S source /W] message

 

messageThe text to write.
sourceThe source for this message.

 

/C(ategory)/S(ource)
/E(rror)/W(arning)

/I(nformational)

 

See also: HISTORY and LOG.

 

Usage:

 

EVENTLOG posts messages to the Windows application event log. Each message can be a maximum of 8,191 characters long. You cannot use the command separator character ([&]) or the redirection symbols (| > <) in an EVENTLOG message, unless you enclose the message in quotes or precede the special characters with the escape character.

 

By default, the text written with EVENTLOG is stored in the event log as informational messages. You can store warning and error messages by using the /W and /E switches.

 

Messages in the log can be reviewed with the Windows Event Log viewer.

 

If you do not have proper registry permissions when you execute the EVENTLOG command and/or the key cannot be created, EVENTLOG will fail and display an error. EVENTLOG is primarily intended for use by users with Administrator status.

 

Options:

 

/CnSet the event category.  The value can be from 0-999999; Windows defines 0-7 as:

 

             0 - None

             1 - Devices

             2 - Disk

             3 - Printers

             4 - Services

             5 - Shell

             6 - System

             7 - Network

 

/EStore the message as an error entry in the event log.

 

/IStore the message as an informational entry in the event log. This is the default if no switch is used.

 

/SSpecify the event log entry source. (If the source contains white space, it must be double-quoted). For example:

 

               eventlog /sCompiling /I Your message here.

 

/WStore the message as a warning entry in the event log.

Topic "eventlog.htm" last edited 2008-05-12. ©2009  JP Software, Inc.
Keywords: EVENTLOG