KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > core > logging > impl > BaseLogImpl


1 package net.javacoding.jspider.core.logging.impl;
2
3 import net.javacoding.jspider.core.logging.Log;
4
5 /**
6  * Base implementation of a logger. It contains a template method
7  * that allows concrete subclasses to do the real logging work.
8  *
9  * $Id: BaseLogImpl.java,v 1.2 2003/03/27 17:44:04 vanrogu Exp $
10  *
11  * @author Günther Van Roey
12  */

13 public abstract class BaseLogImpl implements Log {
14
15     /**
16      * Log method.
17      * @param type the type of logging
18      * @param message the message to be logged
19      */

20     public void log(int type, String JavaDoc message) {
21         doLog ( "[LOG] " + message );
22     }
23
24     /**
25      * Logs a message.
26      * @param type type of the log
27      * @param object object of which the toString ( ) will be logged
28      */

29     public void log(int type, Object JavaDoc object) {
30         log ( type, "" + object );
31     }
32
33     /**
34      * Worker method that will do the real logging.
35      * @param message formatted message to be logged
36      */

37     public abstract void doLog ( String JavaDoc message );
38
39 }
40
Popular Tags