Cool. That was more elegant and extensible than I had imagined.
Thanks.
From: Rob Prouse [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2008 6:16 AM
To: Log4NET User
Subject: RE: Port Number in logged message
Pranav
You need to set properties in the Thread context before logging, then mo
Jeegnesh,
You need to put add the following line in the AssemblyInfo.cs file of your
windows service project:
[assembly: log4net.Config.DOMConfigurator(Watch = true)]
Your log should then appear in the installation folder containing that
contains your windows service EXE based on what you put in
Pranav
You need to set properties in the Thread context before logging, then modify
your conversion pattern to output those properties.
log4net.ThreadContext.Properties["Port"] = port;
log4net.ThreadContext.Properties["Host"] = host;
See http://logging.apache.org/log4net/release/manual/contex