info.informatica.log
Class ExtendedLogger

java.lang.Object
  extended by info.informatica.log.BaseLogger
      extended by info.informatica.log.ExtendedLogger
All Implemented Interfaces:
Logger
Direct Known Subclasses:
FileLogger, HTTPLogger, MailLogger

public abstract class ExtendedLogger
extends BaseLogger

ExtendedLogger abstract class

Version:
1.00, noviembre 1999
Author:
amengual at informatica dot info

Field Summary
 
Fields inherited from interface info.informatica.log.Logger
LOG_ALERT, LOG_CRIT, LOG_DEBUG, LOG_EMERG, LOG_ERR, LOG_INFO, LOG_NOTICE, LOG_WARNING
 
Constructor Summary
ExtendedLogger()
          Constructor
 
Method Summary
static ExtendedLogger getExtendedLogger(String s)
          Instantiates and initializes a logger
 void init(String s)
          Initialize this logger You only need to implement this method if applicable, otherwise if you call it will throw an Exception
 void log(int level, String s)
          This must be implemented by Loggers
 void log(long logid, String ohost, String clase, int level, String s)
          logs a message if haven't been logged previously by this logger
 void log(long logid, String ohost, String clase, int level, Throwable t, String s)
          logs an Exception if haven't been logged previously by this logger
abstract  void log(String ohost, String clase, int level, String s)
          This must be implemented by ExtendedLoggers
abstract  void log(String ohost, String clase, int level, Throwable t, String s)
          This must be implemented by ExtendedLoggers
 
Methods inherited from class info.informatica.log.BaseLogger
closeLog, getLogDate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedLogger

public ExtendedLogger()
Constructor

Method Detail

init

public void init(String s)
          throws LogConfigException
Initialize this logger

You only need to implement this method if applicable, otherwise if you call it will throw an Exception

Throws:
LogConfigException

log

public void log(long logid,
                String ohost,
                String clase,
                int level,
                String s)
logs a message if haven't been logged previously by this logger

Parameters:
logid - Log message ID
ohost - Origin host
clase - Class producing the log
level - Log level
s - Log message

log

public void log(long logid,
                String ohost,
                String clase,
                int level,
                Throwable t,
                String s)
logs an Exception if haven't been logged previously by this logger

Parameters:
logid - Log message ID
ohost - Origin host
clase - Class producing the log
level - Log level
t - The throwable exception to be logged
s - Log message

getExtendedLogger

public static ExtendedLogger getExtendedLogger(String s)
                                        throws LogConfigException
Instantiates and initializes a logger

Parameters:
s - String with the class name and (optional) initialization parameter
Returns:
an instance of the specified ExtendedLogger
Throws:
LogConfigException

log

public void log(int level,
                String s)
This must be implemented by Loggers

Specified by:
log in interface Logger
Specified by:
log in class BaseLogger
Parameters:
level - Log level
s - Log message

log

public abstract void log(String ohost,
                         String clase,
                         int level,
                         String s)
This must be implemented by ExtendedLoggers

Parameters:
ohost - Origin host
clase - Class producing the log
level - Log level
s - Log message

log

public abstract void log(String ohost,
                         String clase,
                         int level,
                         Throwable t,
                         String s)
This must be implemented by ExtendedLoggers

Parameters:
ohost - Origin host
clase - Class producing the log
level - Log level
t - The throwable exception to be logged
s - Log message