Home All Groups Group Topic Archive Search About

Custom Event Log problem.

Author
17 May 2006 9:19 PM
djouungk
I created a custom event log.  I can write to it without any problems.
When I look at it in the event viewer, I see that the custom event log
copied the system log and If I clear out the custom one it clears out
the system log.  Is this supposed to happen?

I don't want anything fancy, just to write text messages to this log.
I am also getting in the system log:

"The description for Event ID ( 0 ) in Source ( EventLogTry ) cannot be
found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following
information is part of the event: Test Message Written."

Here is my code:

        public Form1() {
            InitializeComponent();
            checkLog();
        }

        private void checkLog() {
            if (!EventLog.SourceExists("EventLogTry")) {
                EventSourceCreationData d = new
EventSourceCreationData("EventLogTry","myEventLog");
                EventLog.CreateEventSource(d);
            }
        }

        private void btnCreateLog_Click(object sender, EventArgs e) {
            if (this.txtLogName.Text.Length != 0) {
                myEventLog.WriteEntry("Test Message Written.");
            }
        }

TIA,
Doug

Author
18 May 2006 12:45 PM
Stuart Nathan
I had the same problem, which I solved when I rebooted my machine.
Author
18 May 2006 1:07 PM
djouungk
ohhhhhh kaaaaaaaay......

Why?  I turned my compter off last night after work, having removed
that event log beforehand.  It was created and wrote just fine this
morning.  Is there a registry flag that changes that requires a reboot
when making a custom event log for the first time???
Author
18 May 2006 2:06 PM
Kevin Spencer
Not normally, but something on your machine is causing the issue. Perhaps
anti-virus software, or some other protective mechanism. It's hard to
diagnose these things.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

<djouu***@hotmail.com> wrote in message
Show quote
news:1147957625.039290.174660@i40g2000cwc.googlegroups.com...
> ohhhhhh kaaaaaaaay......
>
> Why?  I turned my compter off last night after work, having removed
> that event log beforehand.  It was created and wrote just fine this
> morning.  Is there a registry flag that changes that requires a reboot
> when making a custom event log for the first time???
>
Author
18 May 2006 2:49 PM
djouungk
Thanks, now I can move forward at least.  I'll require a reboot after
installation on the servers.

Thanks for your info,
Doug

AddThis Social Bookmark Button