|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Custom Event Log problem.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 I had the same problem, which I solved when I rebooted my machine.
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??? 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. -- Show quoteHTH, 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 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??? > |
|||||||||||||||||||||||