Re: Windows Service and EventLog
- From: "Microsoft" <jsheble-NOSPAM@xxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 11:43:28 -0700
I agree with you that is "should" be a piece of cake... but I cannot get
anything to log when and where I expect it to... I am running on XP Pro...
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:OO125UcSFHA.252@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> First a dumb question, you are not running in win 9X/ME right?
>
> If not, it should be piece of cake using the EventLog:
> Three lines are needed:
>
> eventLog1 = new System.Diagnostics.EventLog();
> //
> // eventLog1
> //
> eventLog1.Log = "Application";
> eventLog1.Source = "Fatal Crash system";
>
> cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
> "Microsoft" <jsheble-NOSPAM@xxxxxxxxxxx> wrote in message
> news:evGbGHcSFHA.3088@xxxxxxxxxxxxxxxxxxxxxxx
>> I'm creating a windows service with C#, but am having a huge amount of
>> difficulties using the event log. In the design view of the service, I
>> drop an EventLog component. I name the source the same as my service app
>> and the log property I name with an appropriate name. However, this
>> particular log never gets any entries, regardless of the AutoLog
>> property. (In fact, I have the AUtoLog property set to false, but there
>> are still log entries in the System log (why there??) of the start and
>> stop routines. Regardless, the log entries I want to make manually
>> (using this.SrvcLog.WriteEntry()) never make it to the log file in
>> question.
>>
>> This is really befuddling me and I sure could use some
>> advice/suggestions...
>>
>
>
.
- Follow-Ups:
- Re: Windows Service and EventLog
- From: jones6
- Re: Windows Service and EventLog
- References:
- Windows Service and EventLog
- From: Microsoft
- Re: Windows Service and EventLog
- From: Ignacio Machin \( .NET/ C# MVP \)
- Windows Service and EventLog
- Prev by Date: Re: tricky TimeSpan editing
- Next by Date: Re: Writing to an existing Named Pipe
- Previous by thread: Re: Windows Service and EventLog
- Next by thread: Re: Windows Service and EventLog
- Index(es):