Custom Event Logs



John W.
07-09-2005, 11:57 PM
[XP Pro, SP1] I am using a custom event log for recording application
events. When the log is first created, it gets default properties of
size=512KB and "Overwrite after 7 days". This creates a problem in some
installations where the log size needs to be MB's or the overwrite option
needs to be "as needed." I can access the log properties and make changes on
the form, but the changes are not saved. This happens even when logged in as
Administrator. This only applies to custom logs; standard logs can be
changed at will. Strangely, I have one computer [maybe SP2] where I can get
the changes to stick! What's different between these machines? Why aren't
the changes saved?

And other related questions:
Can I change these parameters within the application?
Why can't a user (even Administrator) delete a custom event log? (It has to
be done within an application.)

Wesley Vogel
07-09-2005, 11:58 PM
What are you using to create the custom event log?

http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&query=custom+event+log&x=14&y=14

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:99880F57-91DF-4761-B512-4944B6F4394D@microsoft.com,
John W. <JohnW@discussions.microsoft.com> hunted and pecked:
> [XP Pro, SP1] I am using a custom event log for recording application
> events. When the log is first created, it gets default properties of
> size=512KB and "Overwrite after 7 days". This creates a problem in some
> installations where the log size needs to be MB's or the overwrite option
> needs to be "as needed." I can access the log properties and make
> changes on the form, but the changes are not saved. This happens even
> when logged in as Administrator. This only applies to custom logs;
> standard logs can be changed at will. Strangely, I have one computer
> [maybe SP2] where I can get the changes to stick! What's different
> between these machines? Why aren't the changes saved?
>
> And other related questions:
> Can I change these parameters within the application?
> Why can't a user (even Administrator) delete a custom event log? (It has
> to be done within an application.)

John W.
07-10-2005, 12:04 AM
C#.NET
EventLog.CreateEventSource(<sourcename>, <logname>, <machine>);

It defaults to the Application log if <logname> is a null string, and
creates a custom log if it isn't. I couldn't find any means of modifying the
create process.

"Wesley Vogel" wrote:

> What are you using to create the custom event log?
>
> http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&query=custom+event+log&x=14&y=14
>
> --
> Hope this helps. Let us know.
>
> Wes
> MS-MVP Windows Shell/User
>

John W.
07-10-2005, 12:06 AM
PARTIAL ANSWER FOUND!!
After you modify the size of a custom log and save the change,
you can then modify the overwrite characteristics and have
them saved. Aha!

The other ("related") questions remain, but are far less critical.

--John
------------
"Wesley Vogel" wrote:

> What are you using to create the custom event log?
>
> http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&query=custom+event+log&x=14&y=14
>
> --
> Hope this helps. Let us know.
>
> Wes
> MS-MVP Windows Shell/User
>
> In news:99880F57-91DF-4761-B512-4944B6F4394D@microsoft.com,
> John W. <JohnW@discussions.microsoft.com> hunted and pecked:
> > [XP Pro, SP1] I am using a custom event log for recording application
> > events. When the log is first created, it gets default properties of
> > size=512KB and "Overwrite after 7 days". This creates a problem in some
> > installations where the log size needs to be MB's or the overwrite option
> > needs to be "as needed." I can access the log properties and make
> > changes on the form, but the changes are not saved. This happens even
> > when logged in as Administrator. This only applies to custom logs;
> > standard logs can be changed at will. Strangely, I have one computer
> > [maybe SP2] where I can get the changes to stick! What's different
> > between these machines? Why aren't the changes saved?
> >
> > And other related questions:
> > Can I change these parameters within the application?
> > Why can't a user (even Administrator) delete a custom event log? (It has
> > to be done within an application.)
>
>

Wesley Vogel
07-10-2005, 12:07 AM
Glad to hear it.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:C91CD942-CC5D-4D05-8FBC-584C70B3AC76@microsoft.com,
John W. <JohnW@discussions.microsoft.com> hunted and pecked:
> PARTIAL ANSWER FOUND!!
> After you modify the size of a custom log and save the change,
> you can then modify the overwrite characteristics and have
> them saved. Aha!
>
> The other ("related") questions remain, but are far less critical.
>
> --John
> ------------
> "Wesley Vogel" wrote:
>
>> What are you using to create the custom event log?
>>
>>
http://support.microsoft.com/search/default.aspx?catalog=LCID%3D1033&query=custom+event+log&x=14&y=14
>>
>> --
>> Hope this helps. Let us know.
>>
>> Wes
>> MS-MVP Windows Shell/User
>>
>> In news:99880F57-91DF-4761-B512-4944B6F4394D@microsoft.com,
>> John W. <JohnW@discussions.microsoft.com> hunted and pecked:
>>> [XP Pro, SP1] I am using a custom event log for recording application
>>> events. When the log is first created, it gets default properties of
>>> size=512KB and "Overwrite after 7 days". This creates a problem in some
>>> installations where the log size needs to be MB's or the overwrite
>>> option needs to be "as needed." I can access the log properties and
>>> make changes on the form, but the changes are not saved. This happens
>>> even when logged in as Administrator. This only applies to custom logs;
>>> standard logs can be changed at will. Strangely, I have one computer
>>> [maybe SP2] where I can get the changes to stick! What's different
>>> between these machines? Why aren't the changes saved?
>>>
>>> And other related questions:
>>> Can I change these parameters within the application?
>>> Why can't a user (even Administrator) delete a custom event log? (It
>>> has to be done within an application.)


Custom Event Logs