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

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

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

revision 1.1 by dog, Sun Oct 19 08:51:37 2003 UTC revision 1.2 by dog, Sun Oct 19 16:16:50 2003 UTC
# Line 37  package gnu.inet.util; Line 37  package gnu.inet.util;
37  public abstract class Logger  public abstract class Logger
38  {  {
39    
40          /**          /**
41           * The singleton instance of this class.           * The singleton instance of this class.
42           */           */
43          private static Logger instance = new StderrLogger();    private static Logger instance = new StderrLogger();
44    
45          /**          /**
46           * Returns the singleton instance of this class.           * Returns the singleton instance of this class.
47           */           */
48          public static Logger getInstance()    public static Logger getInstance()
49          {    {
50                  return instance;      return instance;
51          }    }
52    
53          /**          /**
54           * Sets the singleton instance of this class.           * Sets the singleton instance of this class.
55           * @param logger the new logger to use           * @param logger the new logger to use
56           */           */
57          public static void setInstance(Logger logger)    public static void setInstance(Logger logger)
58          {    {
59                  if (logger==null)      if (logger == null)
60                          throw new NullPointerException();        throw new NullPointerException();
61                  instance = logger;      instance = logger;
62          }    }
63            
64          /**          /**
65           * Logs a configuration message.           * Logs a configuration message.
66           * This is used by the inetlib implementation itself.           * This is used by the inetlib implementation itself.
67           * @param message the message           * @param message the message
68           */           */
69          public abstract void config(String message);    public abstract void config(String message);
70            
71          /**          /**
72           * Logs a provider-specific debugging message.           * Logs a provider-specific debugging message.
73           * @param protocol the provider protocol           * @param protocol the provider protocol
74           * @param message the message           * @param message the message
75           */           */
76          public abstract void log(String protocol, String message);    public abstract void log(String protocol, String message);
77    
78  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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