info.informatica.log
Class HTTPLogger

java.lang.Object
  extended by info.informatica.log.BaseLogger
      extended by info.informatica.log.ExtendedLogger
          extended by info.informatica.log.HTTPLogger
All Implemented Interfaces:
Logger

public class HTTPLogger
extends ExtendedLogger

HTTP-based Logger

Version:
1.01
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
HTTPLogger()
           
 
Method Summary
 void closeLog()
           
 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(String ohost, String clase, int level, String s)
          If ohost is null, will log localhost address
 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.ExtendedLogger
getExtendedLogger, log, log, log
 
Methods inherited from class info.informatica.log.BaseLogger
getLogDate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPLogger

public HTTPLogger()
Method Detail

init

public void init(String s)
          throws LogConfigException
Description copied from class: ExtendedLogger
Initialize this logger

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

Overrides:
init in class ExtendedLogger
Parameters:
s - the URL to which POST the log messages
Throws:
LogConfigException

log

public void log(String ohost,
                String clase,
                int level,
                String s)
If ohost is null, will log localhost address

Specified by:
log in class ExtendedLogger
Parameters:
ohost - Origin host
clase - Class producing the log
level - Log level
s - Log message

log

public void log(String ohost,
                String clase,
                int level,
                Throwable t,
                String s)
Description copied from class: ExtendedLogger
This must be implemented by ExtendedLoggers

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

closeLog

public void closeLog()
Specified by:
closeLog in class BaseLogger