Custom Event Log problem.



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() {

private void checkLog() {
if (!EventLog.SourceExists("EventLogTry")) {
EventSourceCreationData d = new

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



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???

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.


Kevin Spencer
Microsoft MVP
Professional Numbskull

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


Thanks, now I can move forward at least. I'll require a reboot after
installation on the servers.

Thanks for your info,

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question