Hi All,
I'm still at a total loss as to how to get log4net successfully writing
to a custom event log, writing to the Application event log is working
exactly as expected.
I have started using the IEventIDLog extension in order to pass over
event IDs to the log messages to see if this makes any difference.
I've looked over google a lot over the last couple of days and have
tried everything I have found in terms of suggestions. The most recent
one being this:
http://www.mail-archive.com/[email protected]/msg02396.htm
l
Which talks of the same error I'm seeing in the application log that I
mentioned before:
I try to write to MyLog and this is entered into the Application log:
The description for Event ID ( 0 ) in Source ( MyFirstApp ) 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: 2009-06-19 12:11:27,234 14 INFO <MachineName>
<username> Logging.TestHarness.vshost.exe (line: 220)
Logging.TestHarness.LogEntryCreator - Message number 71
System.Exception
I think tried this suggestion:
ILog logger = LogManager.GetLogger(sender);
log4net.ThreadContext.Properties["EventID"] = 12;
logger.Info(0,message);
Which didn't make any difference. I have checked over the Sources key
entries being created in the registery and all seems to be correct in
there as well. I just never see *anything* making it into the MyLog
event log.
I've probably got another 2 hours left to use on this before I have to
move onto other work which is incredibly frustrating as I will leave
behind a 'buggy' half finished wrapper.
Any input would be much appreciated.
:|
James