I’ve experienced this even with lossy=”true”, so I don’t believe this is the issues.  Anybody have any insights into how I might stop this buffer flush to mail?

 

Regards,

 

Adam


From: Adam Jack
Sent: Tuesday, September 20, 2005 8:29 PM
To: '[email protected]'
Subject: SmtpAppender buffer flush (to mail) on shutdown.

 

Howdy folks,

 

I hope this isn’t an FAQ, but I couldn’t find the answer in mailing list archives or in the documentation.

 

I have an SmtpAppender pretty much configured as in the example:

 

 http://logging.apache.org/log4net/release/config-examples.html#smtpappender

 

It is running inside my webapp (configured in the web.config) and works wonderfully, e-mailing me when I get a page crash/error event.

 

The only bummer is sometimes it e-mails me when nothing is wrong, but the webapp has timed out (and is being torn down.) The buffer of non-error log message is sent to me. I’ve attached the config below, and looking at it I see lossy set to false – which is a worry, I’ll set it true again – but I’m pretty certain I only tinkered with that setting when this started happening. Of course, I was preparing this e-mail as I found that setting.

 

Time will tell if this fixes the problem, but I’d really appreciate insights. Is this a designed in feature, or an unintentional side effect? If intentional can I disable it with some (say) disable statement when I capture the shutdown event?

 

Thanks for insights, and thanks for this product on this platform.

 

Regards

 

Adam

--

Adventure Central

http://www.AdventureCentral.com

"Great Experiences Deserve Great Technology"

303 292 5522 x111

Denver, CO USA

 

 

                       

                        <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender,log4net">

                                    <to value="[EMAIL PROTECTED]" />

                                    <from value="[EMAIL PROTECTED]" />

                                    <subject value="AdventureWeb Logging." />

                                    <bufferSize value="512" />

                                    <lossy value="false" />

                                    <evaluator type="log4net.Core.LevelEvaluator,log4net">

                                                <threshold value="ERROR" />

                                    </evaluator>

                                    <layout type="log4net.Layout.PatternLayout,log4net">

                                                <conversionPattern value="%property{log4net:HostName} :: %level :: %message %newlineLogger: %logger%newlineThread: %thread%newlineDate: %date%newlineNDC: %property{NDC}%newline%newline" />

                                    </layout>

                        </appender>   

Reply via email to