Windows EventLog - Event ID 0 -


i have windows service app uses eventlog logging. in app installer run:

eventcreate /l application /so "my app" /t success /id 1 /d "initialised log" 

then in application logger in c# do:

eventlog.writeentry(message, eventlogentrytype.error, 1, 0, details); 

however when in application eventlog, in addition events see entries eventid 0. cannot use eventcreate create id=0 entry (says id must >=1). creating these events? , there way stop eventlog complaining corrupted installations?

one example entry says:

the following information included event:

service started successfully.

the message resource present message not found in string/message table

the servicebase class has property autolog, default true. means automatically report state changes start, stop, pause , continue. msdn documentation here.

if want report information custom log, rather application log, or if want suppress these event log entries, should set autolog false in constructor.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -