Package com.log4jviewer.filters

Examples of com.log4jviewer.filters.LogFilterEngine


    private LogList logList;

    private LogFilterEngine logFilterEngine;

    public void init() {
        logFilterEngine = new LogFilterEngine();
        logList = new LogList(logFilterEngine, getLogBufferSize());
        errorsContainer = new ErrorsContainer();
        serverPreferences = new ServerPreferences();
    }
View Full Code Here


    }

    @Test
    public void addLogTest() {
        int logBufferSize = 6;
        LogFilterEngine logFilterEngine = new LogFilterEngine();
        LogList logList = new LogList(logFilterEngine, logBufferSize);

        for (LogEvent log : logMocks) {
            logList.addLog(log);
        }
View Full Code Here

    }

    @Test
    public void addLogWithFilterTest() {
        FilterModel filterModel = createFilterMock();
        LogFilterEngine logFilterEngine = new LogFilterEngine();
        logFilterEngine.setFilter(filterModel);
        int logBufferSize = 6;
        LogList logList = new LogList(logFilterEngine, logBufferSize);

        for (LogEvent log : logMocks) {
            logList.addLog(log);
View Full Code Here

    }

    @Test
    public void logBufferValidatorTest() {
        FilterModel filterModel = createFilterMock();
        LogFilterEngine logFilterEngine = new LogFilterEngine();
        logFilterEngine.setFilter(filterModel);
        int logBufferSize = 1;
        LogList logList = new LogList(logFilterEngine, logBufferSize);

        for (LogEvent log : logMocks) {
            logList.addLog(log);
        }
        Assert.assertEquals(0, logList.getFilteredLogsNum());

        logFilterEngine.setFilter(null);
        logList.revalidate();
        Assert.assertEquals(1, logList.getFilteredLogsNum());
        Assert.assertEquals(logMocks.get(5), logList.getFilteredLog(0));

        logList.clear();
View Full Code Here

    private LogList logList;

    @Before
    public void init() {
        logList = new LogList(new LogFilterEngine(), 5);
        logFileLoader = new LogFileLoader();
        logFileLoader.addListener(logList);
    }
View Full Code Here

TOP

Related Classes of com.log4jviewer.filters.LogFilterEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.