Write to Windows event log: Difference between revisions

m
→‎{{header|REXX}}: added/changed comments and whitespace.
(Added Kotlin)
m (→‎{{header|REXX}}: added/changed comments and whitespace.)
Line 382:
=={{header|REXX}}==
This was executed on a (Microsoft) Windows/XP PRO system.
<lang rexx>/*REXX program writes a "record" (event) to the (MSMicrosoft) Windows event log. */
 
eCMD = 'EVENTCREATE' /*name of the command that'll be used. */
type = 'INFORMATION' /*one of: ERROR WARNING INFORMATION */
id = 234 /*in range: 1 ───► 1000 (inclusive).*/
logName = 'APPLICATION' /*information about what this is. */
source = 'REXX' /* " " who's doing this. */
source = 'REXX'
desc = 'attempting to add an entry for a Rosetta Code demonstration.'
desc = '"' || desc || '"' /*enclose DESCriptiondescription in double quotes.*/
 
eCMD '/T' type "/ID" id '/L' logName "/SO" source '/D' desc
 
/*stick a fork in it honey, we're all done. */</lang>
'''{{out|output''' }}
<pre>
SUCCESS: A 'INFORMATION' type event is created in the 'REXX' log/source.