01: /*
02: * Copyright (C) The DNA Group. All rights reserved.
03: *
04: * This software is published under the terms of the DNA
05: * Software License version 1.1, a copy of which has been included
06: * with this distribution in the LICENSE.txt file.
07: */
08: package org.codehaus.dna.impl;
09:
10: import java.util.logging.Level;
11: import java.util.logging.LogRecord;
12: import java.util.logging.Logger;
13:
14: class MockLogger extends Logger {
15: boolean m_output;
16: Level m_priority;
17: String m_message;
18: Throwable m_throwable;
19:
20: public MockLogger(final Level level) {
21: super ("test", null);
22: setLevel(level);
23: }
24:
25: public void log(final LogRecord record) {
26: m_output = true;
27: m_priority = record.getLevel();
28: m_message = record.getMessage();
29: m_throwable = record.getThrown();
30: }
31: }
|