View Javadoc

1   ////////////////////////////////////////////////////////////////////////////////
2   // MillScript: an Open Spice interpreter and batch website creation tool
3   // Copyright (C) 2004 Kevin Rogers
4   //
5   // This file is part of MillScript.
6   //
7   // MillScript is free software; you can redistribute it and/or modify it under
8   // the terms of the GNU General Public License as published by the Free
9   // Software Foundation; either version 2 of the License, or (at your option)
10  // any later version.
11  //
12  // MillScript is distributed in the hope that it will be useful, but WITHOUT
13  // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15  // more details.
16  //
17  // You should have received a copy of the GNU General Public License along with
18  // MillScript; if not, write to the Free Software Foundation, Inc., 59 Temple
19  // Place, Suite 330, Boston, MA  02111-1307  USA
20  ////////////////////////////////////////////////////////////////////////////////
21  package org.millscript.millscript.conf.logging;
22  
23  /**
24   * The basic logging interface for MillScript. This will very likely need
25   * replacing the near future, as this interface should abstract the different
26   * destinations for messages(there may be multiple destinations).
27   */
28  public interface Logger {
29  
30      /**
31       * Logs the specified object as an "alert" level message.
32       *
33       * @param o the object to log
34       */
35      void alert( final Object o );
36  
37      /**
38       * Logs the specified object as an "alert" level message and ends the
39       * current line of output.
40       *
41       * @param o the object to log
42       */
43      void alertLine( final Object o );
44  
45      /**
46       * Logs the specified object as a "crit" level message.
47       *
48       * @param o the object to log
49       */
50      void crit( final Object o );
51  
52      /**
53       * Logs the specified object as a "crit" level message and ends the
54       * current line of output.
55       *
56       * @param o the object to log
57       */
58      void critLine( final Object o );
59  
60      /**
61       * Logs the specified object as a "debug" level message.
62       *
63       * @param o the object to log
64       */
65      void debug( final Object o );
66  
67      /**
68       * Logs the specified object as a "debug" level message and ends the
69       * current line of output.
70       *
71       * @param o the object to log
72       */
73      void debugLine( final Object o );
74  
75      /**
76       * Logs the specified object as an "emerg" level message.
77       *
78       * @param o the object to log
79       */
80      void emerg( final Object o );
81  
82      /**
83       * Logs the specified object as an "emerg" level message and ends the
84       * current line of output.
85       *
86       * @param o the object to log
87       */
88      void emergLine( final Object o );
89  
90      /**
91       * Logs the specified object as an "error" level message.
92       *
93       * @param o the object to log
94       */
95      void error( final Object o );
96  
97      /**
98       * Logs the specified object as an "error" level message and ends the
99       * current line of output.
100      *
101      * @param o the object to log
102      */
103     void errorLine( final Object o );
104 
105     /**
106      * Logs the specified object as an "info" level message.
107      *
108      * @param o the object to log
109      */
110     void info( final Object o );
111 
112     /**
113      * Logs the specified object as an "info" level message and ends the
114      * current line of output.
115      *
116      * @param o the object to log
117      */
118     void infoLine( final Object o );
119 
120     /**
121      * Logs the specified object as a "notice" level message.
122      *
123      * @param o the object to log
124      */
125     void notice( final Object o );
126 
127     /**
128      * Logs the specified object as a "notice" level message and ends the
129      * current line of output.
130      *
131      * @param o the object to log
132      */
133     void noticeLine( final Object o );
134 
135     /**
136      * Prints the specified object to the relevant output for this logger.
137      *
138      * @param o The Object to be printed
139      */
140     void print( final Object o );
141 
142     /**
143      * Prints the specified object to the relevant output for this logger and
144      * then ends the line.
145      *
146      * @param o The Object to be printed
147      */
148     void println( final Object o );
149 
150     /**
151      * Prints a stack trace for the specified throwable object, to the relevant
152      * output for this logger.
153      *
154      * @param t The throwable to print a stack trace for
155      */
156     void stackTrace( final Throwable t );
157 
158     /**
159      * Logs the specified object as a "warn" level message.
160      *
161      * @param o the object to log
162      */
163     void warn( final Object o );
164 
165     /**
166      * Logs the specified object as a "warn" level message and ends the
167      * current line of output.
168      *
169      * @param o the object to log
170      */
171     void warnLine( final Object o );
172 
173 }