Ollie,
Entries are also written to the 'Application' event log, unless you override
the ServiceBase.EventLog property & return a custom event log.
http://msdn.microsoft.com/library/de...ntlogtopic.asp
By overriding ServiceBase.EventLog & returning a NEW event log object you
can change where the AutoLog entries are written. The above page suggests
you cannot, however I believe the above page is referring to the fact you
cannot (should not) change the EventLog returned from the
ServiceBase.EventLog property, you need to return a new one!
NOTE: The entries written to the 'System' event log are still written
there...
Hope this helps
Jay
"Ollie Riches" <ol**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
when a windows service starts or stops it is automatically logged to the
'System' event log.
HTH
Ollie Riches
"Julia" <co********@012.net.il> wrote in message
news:uS**************@TK2MSFTNGP11.phx.gbl... Yes, i am thinking to log to the event log only "Service X
started\stopped.",
error and exceptions
and other stuff will goes to a log file
Thanks.
"Brian Brown" <Br********@discussions.microsoft.com> wrote in message
news:8B**********************************@microsof t.com... > Hi Julia,
>
> I think that it entirely depends on what you are logging. If it is a
> minimal amount of information that you are logging (e.g. Service x
started, > Service x error..,etc) and the information fits one of the existing
> logs I > believe that using an existing log would be fine. If you are logging
> an
> extensive amount of information that would clutter the existing logs or
> doesn't match the content I believe that it would be best to go with
your own > log. Just my opinion.
>
> Hope this helps.
> -------------------