public final LogTarget createTarget( final Configuration config )
throws ConfigurationException
{
try
{
SMTPOutputLogTarget logTarget = new SMTPOutputLogTarget(
getSession( config ),
getToAddresses( config ),
getFromAddress( config ),
getSubject( config ),
getMaxSize( config ),
getMaxDelayTime( config ),
getFormatter( config )
);
// Only set the debug flag when true. The flag is global in javamail
// and this makes things work more cleanly with old logkit versions.
boolean debug = getDebug( config );
if ( debug )
{
logTarget.setDebug( debug );
}
return logTarget;
}
catch( final ContextException ce )