01: package org.objectweb.celtix.bus.transports.https;
02:
03: import java.util.logging.Handler;
04: import java.util.logging.LogRecord;
05:
06: class TestHandler extends Handler {
07: String log;
08:
09: public TestHandler() {
10: log = "";
11: }
12:
13: public void publish(LogRecord record) {
14: log += record.getMessage();
15:
16: }
17:
18: public void flush() {
19:
20: }
21:
22: public void close() throws SecurityException {
23:
24: }
25:
26: boolean checkLogContainsString(String str) {
27: if (log.indexOf(str) == -1) {
28: return false;
29: }
30: return true;
31: }
32:
33: }
|