/[classpath]/inetlib/source/gnu/inet/util/StderrLogger.java
ViewVC logotype

Diff of /inetlib/source/gnu/inet/util/StderrLogger.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by dog, Thu Oct 21 15:21:55 2004 UTC revision 1.6 by dog, Thu Nov 25 22:15:05 2004 UTC
# Line 1  Line 1 
1  /*  /*
2   * $Id$   * StderrLogger.java
3   * Copyright (C) 2003 The Free Software Foundation   * Copyright (C) 2003 The Free Software Foundation
4   *   *
5   * This file is part of GNU inetlib, a library.   * This file is part of GNU inetlib, a library.
# Line 42  package gnu.inet.util; Line 42  package gnu.inet.util;
42   * A logger that simply writes to <code>System.err</code>.   * A logger that simply writes to <code>System.err</code>.
43   *   *
44   * @author <a href="mailto:dog@gnu.org">Chris Burdess</a>   * @author <a href="mailto:dog@gnu.org">Chris Burdess</a>
  * @version $Revision$ $Date$  
45   */   */
46  public class StderrLogger extends Logger  public class StderrLogger
47      extends Logger
48  {  {
49    
50    /**    /**
# Line 52  public class StderrLogger extends Logger Line 52  public class StderrLogger extends Logger
52     * This is used by the inetlib implementation itself.     * This is used by the inetlib implementation itself.
53     * @param message the message     * @param message the message
54     */     */
55    public void config (String message)    public void config(String message)
56    {    {
57      System.err.print ("DEBUG: ");      System.err.print("DEBUG: ");
58      System.err.println (message);      System.err.println(message);
59    }    }
60    
61    /**    /**
# Line 63  public class StderrLogger extends Logger Line 63  public class StderrLogger extends Logger
63     * @param protocol the provider protocol     * @param protocol the provider protocol
64     * @param message the message     * @param message the message
65     */     */
66    public void log (String protocol, String message)    public void log(String protocol, String message)
67    {    {
68      System.err.print (protocol);      System.err.print(protocol);
69      System.err.print (": ");      System.err.print(": ");
70      System.err.println (message);      System.err.println(message);
71    }    }
72        
73    public void error (String protocol, Throwable t)    public void error(String protocol, Throwable t)
74    {    {
75      System.err.print (protocol);      System.err.print(protocol);
76      System.err.print (": ");      System.err.print(": ");
77      t.printStackTrace (System.err);      t.printStackTrace(System.err);
78    }    }
79    
80  }  }
81    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26