Is it possible that the email appender doesn't see the logs from
MemoryWarningSystem because of being on a different trunk of the
logger tree?

On Fri, May 30, 2008 at 12:12 PM, Stephen More <[EMAIL PROTECTED]> wrote:
> I have configured log4j.xml with a <appender name="email"
> class="org.apache.log4j.net.SMTPAppender"> that is emailing out all
> ERROR messages except for one specific error.
>
> I have added a MemoryWarningSystem to a tomcat servlet. (
> http://www.javaspecialists.eu/archive/Issue092.html )
>
> public void init() throws javax.servlet.ServletException
>    {
>        _log.trace( "Executing INIT" );
>
>        MemoryWarningSystem.setPercentageUsageThreshold( 0.1 );
>
>        mws = new MemoryWarningSystem();
>        mws.addListener( new MemoryWarningSystem.Listener()
>        {
>            public void memoryUsageLow( long usedMemory, long maxMemory )
>            {
>                double percentageUsed = ((double) usedMemory) / maxMemory;
>                _log.error("Memory percentageUsed = " + percentageUsed);
>                MemoryWarningSystem.setPercentageUsageThreshold( 0.2 );
>            }
>        });
>    }
>
> My file appender shows "2008-05-30 13:01:13,083 ERROR
> [MonitorServlet:24] Memory percentageUsed = 0.10273910155216874" but I
> get no email. ( I do get other ERROR emails ).
>
> What is the best way I can get this working ?
>
> -Thanks
> Steve More
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
James A. N. Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to