rabbit.proxy
Class ProxyLogger

java.lang.Object
  extended by rabbit.proxy.ProxyLogger
All Implemented Interfaces:
ConnectionLogger, Logger

public class ProxyLogger
extends Object
implements Logger, ConnectionLogger

A class to handle proxy logging.

Author:
Robert Olofsson

Constructor Summary
ProxyLogger()
          Create a new ProxyLogger.
 
Method Summary
 void close()
          Close down this logger.
 long getOffset()
          Get the distance to GMT in millis
 void logAll(String error)
          Log some information Same as logError (ALL, error);
 void logConnection(Connection con)
          Log a finished connection.
 void logDebug(String error)
          Log a debug message.
 void logError(Level level, String error)
          Log an error of given type and with given message.
 void logError(String error)
          Log an error.
 void logFatal(String error)
          Log an fatal error.
 void logInfo(String error)
          Log some information.
 void logMsg(String error)
          Log a message.
 void logWarn(String error)
          Log a warning.
 void rotateLogs()
          Rotate the current logs.
 void setup(SProperties config)
           
 boolean showsLevel(Level level)
          Check if the logger currently handles logging on the given level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyLogger

public ProxyLogger()
Create a new ProxyLogger.

Method Detail

getOffset

public long getOffset()
Get the distance to GMT in millis


setup

public void setup(SProperties config)

rotateLogs

public void rotateLogs()
Description copied from interface: Logger
Rotate the current logs. That is close the current log files and move them away, then reopen the log files again.

Specified by:
rotateLogs in interface Logger

close

public void close()
Close down this logger. Will set the access and error logs to console.


logDebug

public void logDebug(String error)
Description copied from interface: Logger
Log a debug message. Same as logError (DEBUG, error);

Specified by:
logDebug in interface Logger

logAll

public void logAll(String error)
Description copied from interface: Logger
Log some information Same as logError (ALL, error);

Specified by:
logAll in interface Logger

logInfo

public void logInfo(String error)
Description copied from interface: Logger
Log some information. Same as logError (Info, error);

Specified by:
logInfo in interface Logger

logWarn

public void logWarn(String error)
Description copied from interface: Logger
Log a warning. Same as logError (WARN, error);

Specified by:
logWarn in interface Logger

logMsg

public void logMsg(String error)
Description copied from interface: Logger
Log a message. Same as logError (MSG, error);

Specified by:
logMsg in interface Logger

logError

public void logError(String error)
Description copied from interface: Logger
Log an error. Same as logError (ERROR, error);

Specified by:
logError in interface Logger

logFatal

public void logFatal(String error)
Description copied from interface: Logger
Log an fatal error. Same as logError (FATAL, error);

Specified by:
logFatal in interface Logger

showsLevel

public boolean showsLevel(Level level)
Description copied from interface: Logger
Check if the logger currently handles logging on the given level.

Specified by:
showsLevel in interface Logger

logError

public void logError(Level level,
                     String error)
Description copied from interface: Logger
Log an error of given type and with given message.

Specified by:
logError in interface Logger
Parameters:
level - the error level.
error - the error message.

logConnection

public void logConnection(Connection con)
Description copied from interface: ConnectionLogger
Log a finished connection.

Specified by:
logConnection in interface ConnectionLogger
Parameters:
con - the Connection that has finished one operation.