I don't know if this will work in your case, but it's worth a try:
while using an SMTPAppender I used ${COMPUTERNAME} in the subject header
to include the current comuter's name. It worked.
-Leo
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 3:44 AM
To: [email protected]
Subject: Machine name
I may be being dumb here, but I can't see any way of getting hold of the
machine name that an event is being logged from.
I have multiple machines in a cluster using an ADOAppender to write to a
common database, and I want to write a column with the machine name in
it. Is there a simple way to get hold of the name?
Cheers,
Bill
-----Original Message-----
From: Nicko Cadell [mailto:[EMAIL PROTECTED]
Sent: 18 April 2005 10:22
To: Log4NET User
Subject: [Maybe Spam] RE: Problem with headers and footers in
beta
1.2.9
You need to use XML numeric character references:
\r = 
\n = 

Therefore \r\n becomes 
 in XML.
Or alternatively you can use the PatternString type to expand patterns
in the header value, e.g.:
<header type="log4net.Util.PatternString" value="START pid=%processid
date=%date %newline" />
Cheers,
Nicko
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2005 09:18
> To: [email protected]
> Subject: Problem with headers and footers in beta 1.2.9
>
> Hello,
>
> Last week, I downloaded the new 1.2.9 beta version and I
> started to convert one of my projects in order to use it.
>
> But, now, as announced in the Breaking Changes list, C style
> escape sequences are not supported any more.
>
> So far so good, but... With the previous versions, in the
> Header and Footer parameters, I added \\\"\\\\r\\\\n\\\" at
> the end of the line in order to avoid the first line of the
> log to be appended to the header line.
>
> Now that C style escape sequences are not translated, I
> cannot find how to force a new line at the end of the header
> line. (I tried to add %newline as it can be done in the
> ConversionPattern, but, as I could expect, it doesn't work
> because there is no pattern interpretation in the Header and
> Footer parameters.
>
> Therefore, is this a bug or is there another way to do it ?
>
> By the way, congratulation for you excellent work. Log4net as
> already saved me hours of work. It's so easy to integrate it
> in a p! roject !
>
> Stephane Corteel
> Technical and R&D Director
> ASK sa
> www.ask.be
>
>
>
UK businesses use 2 million tonnes of paper each year.
THINK before you PRINT this email.
______________________________________________________________
CONFIDENTIALITY NOTICE
This communication and the information it contains is intended for the
person or organisation to
whom it is addressed. Its contents are confidential and may be
protected in law. Unauthorised use, copying or disclosure of any of it
may be unlawful. If you are not the intended recipient, please
contact us immediately.
The contents of any attachments in this e-mail may contain software
viruses, which could damage your
own computer system. While Marlborough Stirling has taken every
reasonable precaution to minimise
this risk, we cannot accept liability for any damage, which you sustain
as a result of software
viruses. You should carry out your own virus checking procedure before
opening any attachment.
Marlborough Stirling plc, Registered in England and Wales
Registered No. 3008820,
Jessop House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000 Fax: 01242 547100
http://www.marlborough-stirling.com