Any
ideas on this one?
-----Original Message-----
From: Hart, Leo
Sent: Monday, March 14, 2005 4:23 PM
To: [email protected]
Subject: COMPUTERNAME Environment VariableHere's something I've come across that maybe someone else has seen:I've set up a RollingFileAppender:<appender name="SMTP - Leo" type="log4net.Appender.SMTPAppender">
<param name="To" value="[EMAIL PROTECTED]" />
<param name="From" value="[EMAIL PROTECTED]" />
<param name="Subject" value="${COMPUTERNAME} SHARES Exception - Log4Net Generated" />
<param name="SMTPHost" value="mailserver.mycompany.com" />
<param name="LocationInfo" value="false" />
<param name="BufferSize" value="1024" />
<param name="Lossy" value="true" />
<evaluator type="log4net.spi.LevelEvaluator">
<param name="Threshold" value="ERROR"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%-5p | %d{yyyy-MM-dd HH:mm:ss, fff} | %t | %X{vendorCode} | %X{adminID} | %X{sessionID} | %c | %m%n" />
</layout>
</appender>To email me whenever an exception occurs in my application. You'll notice I'm using the COMPUTERNAME environment variable in the subject line. Whenever I hit the website directly, bypassing our proxy server and cause an error, I receive an email with the subject I expect:SERVERNAME SHARES Exception - Log4Net GeneratedHowever, if I go through our proxy server and create an error, I receive an email with the following subject:SHARES Exception - Log4Net GeneratedSo it would appear the COMPUTERNAME server variable is not being recognized. Does anyone have any idea why this would occur? I've noticed this behavior in all of our environments, QA, UAT and PRD. I've ensured that all of the servers on each environment are configured the same way.Thanks,Leo Hart
