use of alma.acs.logging.archive.zoom.FileHelper in project ACS by ACS-Community.
the class FileHelperTest method testLoadFilterAll.
/**
* Test the loading of logs between a defined time interval
* and a definit log level interval
*/
public void testLoadFilterAll() throws Exception {
IsoDateFormat dateFormat = new IsoDateFormat();
Date startDate = dateFormat.parse("2008-09-19T11:21:49.500");
Date endDate = dateFormat.parse("2008-09-19T11:21:49.600");
fileHelper = new FileHelper(testFile, startDate.getTime(), endDate.getTime(), LogTypeHelper.DEBUG, LogTypeHelper.NOTICE);
numOfLogsRead = 0;
assertTrue(fileHelper.loadLogs(this, this, this));
assertEquals(15, numOfLogsRead);
}
use of alma.acs.logging.archive.zoom.FileHelper in project ACS by ACS-Community.
the class FileHelperTest method testLoadLevelRange.
/**
* Test the loading of logs between a defined range of levels
*/
public void testLoadLevelRange() throws Exception {
fileHelper = new FileHelper(testFile, 0L, System.currentTimeMillis(), LogTypeHelper.TRACE, LogTypeHelper.INFO);
numOfLogsRead = 0;
assertTrue(fileHelper.loadLogs(this, this, this));
assertEquals(68, numOfLogsRead);
}
use of alma.acs.logging.archive.zoom.FileHelper in project ACS by ACS-Community.
the class FileHelperTest method testLoadTimelRange.
/**
* Test the loading of logs between a defined time interval
*/
public void testLoadTimelRange() throws Exception {
IsoDateFormat dateFormat = new IsoDateFormat();
Date startDate = dateFormat.parse("2008-09-19T11:21:49.500");
Date endDate = dateFormat.parse("2008-09-19T11:21:49.600");
fileHelper = new FileHelper(testFile, startDate.getTime(), endDate.getTime(), LogTypeHelper.values()[0], LogTypeHelper.values()[LogTypeHelper.values().length - 1]);
numOfLogsRead = 0;
assertTrue(fileHelper.loadLogs(this, this, this));
assertEquals(45, numOfLogsRead);
}
use of alma.acs.logging.archive.zoom.FileHelper in project ACS by ACS-Community.
the class FileHelperTest method testLoadAll.
/**
* Test loading with no times and no levels restrictions
*/
public void testLoadAll() throws Exception {
fileHelper = new FileHelper(testFile, 0L, System.currentTimeMillis(), LogTypeHelper.values()[0], LogTypeHelper.values()[LogTypeHelper.values().length - 1]);
numOfLogsRead = 0;
assertTrue(fileHelper.loadLogs(this, this, this));
assertEquals(totalLogsInFile, numOfLogsRead);
}
Aggregations