The %property pattern was added in version 1.2.9. In older versions you must use %P (capital P). If possible it is recommended that you upgrade to the latest version of log4net.
Cheers, Nicko > -----Original Message----- > From: Cheng [mailto:[EMAIL PROTECTED] > Sent: 09 May 2006 19:02 > To: Log4NET User > Subject: how to get host name? > > I am using AdoNetAppender. I want to log the name of the > machine that is running the application. > > I tried following but doesn't work: > <parameter> > <parameterName value="@p_ServerName" /> <dbType > value="String" /> <size value="50" /> <layout > type="log4net.Layout.PatternLayout"> > <conversionPattern value="%property{log4net:HostName}" /> > </layout> </parameter> > > %p is interpreted as level, so what was logged into the database was: > DEBUGroperty{log4net:HostName} > > so my question is what conversionPattern should I use to get > host name? > and where can I see all the conversionPattern values available? > >
