String fileName = "testKieFileLogger";
File file = new File(fileName+".log");
if( file.exists() ) {
file.delete();
}
KieRuntimeLogger logger = KieServices.Factory.get().getLoggers().newFileLogger( ksession,
fileName );
ksession.insert( new Message("Hello World") );
int fired = ksession.fireAllRules();
assertEquals( 1, fired );
logger.close();
file = new File( fileName+".log" );
assertTrue( file.exists() );
file.delete();
}