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]

Reply via email to