KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > velocity > runtime > log > LogSystem


1 package org.apache.velocity.runtime.log;
2
3 /*
4  * Copyright 2001,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import org.apache.velocity.runtime.RuntimeServices;
20
21 /**
22  * Base interface that Logging systems need to implement.
23  *
24  * @author <a HREF="mailto:jon@latchkey.com">Jon S. Stevens</a>
25  * @author <a HREF="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
26  * @version $Id: LogSystem.java,v 1.7.10.1 2004/03/03 23:22:56 geirm Exp $
27  */

28 public interface LogSystem
29 {
30     public final static boolean DEBUG_ON = true;
31
32     /**
33      * Prefix for debug messages.
34      */

35     public final static int DEBUG_ID = 0;
36
37     /**
38      * Prefix for info messages.
39      */

40     public final static int INFO_ID = 1;
41     
42     /**
43      * Prefix for warning messages.
44      */

45     public final static int WARN_ID = 2;
46
47     /**
48      * Prefix for error messages.
49      */

50     public final static int ERROR_ID = 3;
51
52     /**
53      * init()
54      */

55     public void init( RuntimeServices rs ) throws Exception JavaDoc;
56
57     /**
58      * Send a log message from Velocity.
59      */

60     public void logVelocityMessage(int level, String JavaDoc message);
61 }
62
Popular Tags