info.informatica.log
Class LogRule

java.lang.Object
  extended by info.informatica.log.LogRule

public class LogRule
extends Object

Log configuration rule

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

Constructor Summary
LogRule(String clase, int level, int hmax, int dmax, ExtendedLogger logger, String initargs)
          Create a LogRule object with the specified arguments and a null origin host
LogRule(String ohost, String clase, int level, int hmax, int dmax, ExtendedLogger logger, String initargs)
          Create a LogRule object with the specified arguments
 
Method Summary
 void flush()
          Flushes the (repeated) cached entries, if any
 int getDailyCount()
           
 int getDailyLimit()
           
 ExtendedLogger getExtendedLogger()
           
 int getHourlyCount()
           
 int getHourlyLimit()
           
 String getInitArgs()
           
 int getLevel()
           
 String getLoggerName()
           
 String getOriginClass()
           
 String getOriginHost()
           
 boolean limited()
           
 boolean log(long logid, String ohost, String clase, int level, String s)
           
 boolean log(long logid, String ohost, String clase, int level, Throwable t, String s)
           
 boolean samelog(String ohost, String clase, int level, String s)
           
 boolean samelog(String ohost, String clase, int level, Throwable t, String s)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogRule

public LogRule(String clase,
               int level,
               int hmax,
               int dmax,
               ExtendedLogger logger,
               String initargs)
Create a LogRule object with the specified arguments and a null origin host

Parameters:
clase - Class producing the log
level - Log level
hmax - Hourly max
dmax - Daily max
logger - ExtendedLogger for this rule
initargs - Initialization argument(s)

LogRule

public LogRule(String ohost,
               String clase,
               int level,
               int hmax,
               int dmax,
               ExtendedLogger logger,
               String initargs)
Create a LogRule object with the specified arguments

Parameters:
ohost - Origin host
clase - Class producing the log
level - Log level
hmax - Hourly max
dmax - Daily max
logger - ExtendedLogger for this rule
initargs - Initialization argument(s)
Method Detail

getInitArgs

public String getInitArgs()

getHourlyLimit

public int getHourlyLimit()

getDailyLimit

public int getDailyLimit()

getHourlyCount

public int getHourlyCount()

getDailyCount

public int getDailyCount()

log

public boolean log(long logid,
                   String ohost,
                   String clase,
                   int level,
                   String s)
            throws LogException
Throws:
LogException

log

public boolean log(long logid,
                   String ohost,
                   String clase,
                   int level,
                   Throwable t,
                   String s)
            throws LogException
Throws:
LogException

flush

public void flush()
Flushes the (repeated) cached entries, if any


samelog

public boolean samelog(String ohost,
                       String clase,
                       int level,
                       String s)

samelog

public boolean samelog(String ohost,
                       String clase,
                       int level,
                       Throwable t,
                       String s)

getOriginHost

public String getOriginHost()

getOriginClass

public String getOriginClass()

getLevel

public int getLevel()

limited

public boolean limited()

getExtendedLogger

public ExtendedLogger getExtendedLogger()

getLoggerName

public String getLoggerName()