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. |
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 |
/** |
/** |
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 |
/** |
/** |
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 |
|
|