ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/core/loggers/ScreenLogger.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/core/loggers/ScreenLogger.java (file contents):
Revision 1.4 by tdb, Sun Feb 25 20:34:16 2001 UTC vs.
Revision 1.5 by tdb, Sun Feb 25 20:49:20 2001 UTC

# Line 39 | Line 39 | public class ScreenLogger implements LoggerImpl {
39   //---PUBLIC METHODS---
40  
41      /**
42 <     * The write() method takes a message, formats it using the
43 <     * formatLogLine() method, and then outputs it to the screen
44 <     * using System.out.println(). The source is usually the
45 <     * calling object, referenced by `this'. The method has been
46 <     * made synchronized to avoid it being called by two different
47 <     * objects and the output ending up merged on the screen.
48 <     *
49 <     * @param source A string representation of the calling object.
50 <     * @param verbosity the verbosity of this message
51 <     * @param message The text to be logged.
52 <     */  
42 >         * The write() method takes a line of text, pre-formatted
43 >         * and outputs it using a method defined by the actual
44 >         * implementation. The verbosity is given in case the
45 >         * implementation wishes to utilise it in the layout -
46 >         * eg. a different colour or font.
47 >         *
48 >         * This instance simply prints the message to the screen.
49 >         *
50 >         * @param line A line of formatted text to be logged
51 >         * @param verbosity the verbosity of this message
52 >         */  
53      public synchronized void write(String line, int verbosity) {;
54          System.out.println(line);
55      }
# Line 71 | Line 71 | public class ScreenLogger implements LoggerImpl {
71      }
72      
73   //---PRIVATE METHODS---
74 <
74 >    
75 >    /**
76 >     * This method is provided if this class wishes to log
77 >     * a message itself.
78 >     *
79 >         * @param source A String representation of the source
80 >         * @param verbosity the verbosity of this message
81 >         * @param message The message to log
82 >         */  
83      private void write(String source, int verbosity, String message) {
84          write(FormatName.formatLogLine(source, verbosity, message), verbosity);
85      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines