RE: Port Number in logged message

2008-10-09 Thread Pranav Varia
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

RE: Log4net in a windows service

2008-10-09 Thread harry . douglass
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

RE: Port Number in logged message

2008-10-09 Thread Rob Prouse
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