{
try
{
// to add the appender
PatternLayout layout = new PatternLayout("%d - %m%n");
this.appender = new RollingFileAppender(layout, file, true);
// if we successfully created the file appender,
// configure it and set the logger to use only it
appender.setMaxBackupIndex(1);
appender.setMaximumFileSize(100000);