KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > dna > impl > MockLogTarget


1 /*
2  * Copyright (C) The DNA Group. All rights reserved.
3  *
4  * This software is published under the terms of the DNA
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.dna.impl;
9
10 import org.apache.log.LogEvent;
11 import org.apache.log.LogTarget;
12 import org.apache.log.Priority;
13
14 class MockLogTarget
15     implements LogTarget
16 {
17     boolean m_output;
18     Priority m_priority;
19     String JavaDoc m_message;
20     Throwable JavaDoc m_throwable;
21
22     public void processEvent( final LogEvent event )
23     {
24         m_output = true;
25         m_priority = event.getPriority();
26         m_message = event.getMessage();
27         m_throwable = event.getThrowable();
28     }
29 }
30
Popular Tags