Search in sources :

Example 6 with LogFilter

use of org.eclipse.equinox.log.LogFilter in project rt.equinox.framework by eclipse.

the class ExtendedLogReaderServiceTest method testBadFilter.

public void testBadFilter() throws Exception {
    TestListener listener = new TestListener();
    reader.addLogListener(listener, new LogFilter() {

        public boolean isLoggable(Bundle b, String loggerName, int logLevel) {
            throw new RuntimeException("Expected error for testBadFilter.");
        }
    });
    if (log.isLoggable(LogService.LOG_INFO))
        fail();
}
Also used : Bundle(org.osgi.framework.Bundle) LogFilter(org.eclipse.equinox.log.LogFilter)

Aggregations

LogFilter (org.eclipse.equinox.log.LogFilter)6 Bundle (org.osgi.framework.Bundle)3 ArrayList (java.util.ArrayList)1 SynchronousLogListener (org.eclipse.equinox.log.SynchronousLogListener)1 OrderedTaskQueue (org.eclipse.osgi.internal.log.OrderedExecutor.OrderedTaskQueue)1 LogEntry (org.osgi.service.log.LogEntry)1 LogListener (org.osgi.service.log.LogListener)1