aQute.bnd.testing
Class TestingLog
java.lang.Object
aQute.bnd.testing.TestingLog
- All Implemented Interfaces:
- org.osgi.service.log.LogService
public class TestingLog
- extends Object
- implements org.osgi.service.log.LogService
Provides a log service object to be used in testing. It can filter levels and
messages and can trace stack traces and directly output the diagnostic info.
At the end it can be checked if there were any messages logged that fell
within the set criteria.
| Fields inherited from interface org.osgi.service.log.LogService |
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestingLog
public TestingLog()
log
public void log(int level,
String message)
- Specified by:
log in interface org.osgi.service.log.LogService
log
public void log(int level,
String message,
Throwable exception)
- Specified by:
log in interface org.osgi.service.log.LogService
log
public void log(org.osgi.framework.ServiceReference sr,
int level,
String message)
- Specified by:
log in interface org.osgi.service.log.LogService
log
public void log(org.osgi.framework.ServiceReference sr,
int level,
String message,
Throwable exception)
- Specified by:
log in interface org.osgi.service.log.LogService
getEntries
public List<org.osgi.service.log.LogEntry> getEntries()
filter
public TestingLog filter(String pattern)
stacktrace
public TestingLog stacktrace()
direct
public TestingLog direct()
errors
public TestingLog errors()
warnings
public TestingLog warnings()
infos
public TestingLog infos()
debugs
public TestingLog debugs()
level
public TestingLog level(int level)
full
public TestingLog full()
check
public boolean check(String... patterns)
Copyright © 2014 aQute SARL. All rights reserved.