}
public void testSafeFileTarget()
throws Exception
{
final SafeFileTarget target = new SafeFileTarget( m_logFile, false, FORMATTER );
final Logger logger = getNewLogger( target );
logger.debug( M1 );
final String data1 = getFileContents( m_logFile );
assertEquals( "Targets file output", HEAD + R1, data1 );
assertTrue( "Deleting logfile", m_logFile.delete() );
logger.debug( M2 );
logger.debug( M3 );
target.close();
final String data2 = getFileContents( m_logFile );
assertEquals( "Targets file output", R2 + R3 + TAIL, data2 );
assertTrue( "Deleting logfile", m_logFile.delete() );