net.sourceforge.pebble.logging
Class AbstractLogger

java.lang.Object
  extended by net.sourceforge.pebble.logging.AbstractLogger
Direct Known Subclasses:
CombinedLogFormatLogger, NullLogger

public abstract class AbstractLogger
extends java.lang.Object

Interface that all loggers implement.

Author:
Simon Brown

Field Summary
protected  Blog blog
          the blog that this instance is associated with, and logging for
 
Constructor Summary
AbstractLogger(Blog blog)
          Creates a new log associated with the given blog.
 
Method Summary
 Log getLog()
          Gets the log for today.
 Log getLog(int year, int month)
          Gets the log for a given year and month.
abstract  Log getLog(int year, int month, int day)
          Gets the log for a given year, month and day.
 java.lang.String getLogFile()
          Gets a copy of the log file for today.
 java.lang.String getLogFile(int year, int month)
          Gets a copy of the log file for a given year and month.
abstract  java.lang.String getLogFile(int year, int month, int day)
          Gets a copy of the log file for a given year, month and day.
 LogSummary getLogSummary()
          Gets the log summary for today.
 LogSummary getLogSummary(int year)
          Gets the log summary information for the given year.
 LogSummary getLogSummary(int year, int month)
          Gets the log summary information for the given year and month.
abstract  LogSummary getLogSummary(int year, int month, int day)
          Gets the log summary information for the given year, month and day.
abstract  void log(HttpServletRequest request, int status)
          Logs a HTTP request.
abstract  void start()
          Called to start this logger.
abstract  void stop()
          Called to stop this logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blog

protected Blog blog
the blog that this instance is associated with, and logging for

Constructor Detail

AbstractLogger

public AbstractLogger(Blog blog)
Creates a new log associated with the given blog.

Parameters:
blog - a Blog instance
Method Detail

log

public abstract void log(HttpServletRequest request,
                         int status)
Logs a HTTP request.

Parameters:
request - a HttpServletRequest

start

public abstract void start()
Called to start this logger.


stop

public abstract void stop()
Called to stop this logger.


getLogFile

public abstract java.lang.String getLogFile(int year,
                                            int month,
                                            int day)
Gets a copy of the log file for a given year, month and day.

Parameters:
year - the year to get entries for
month - the month to get entries for
day - the day to get entries for
Returns:
a String containing the contents of the requested log file

getLogFile

public java.lang.String getLogFile()
Gets a copy of the log file for today.

Returns:
a String containing the contents of the requested log file

getLogFile

public java.lang.String getLogFile(int year,
                                   int month)
Gets a copy of the log file for a given year and month.

Parameters:
year - the year to get entries for
month - the month to get entries for
Returns:
a String containing the contents of the requested log file

getLog

public abstract Log getLog(int year,
                           int month,
                           int day)
Gets the log for a given year, month and day.

Parameters:
year - the year to get entries for
month - the month to get entries for
day - the day to get entries for
Returns:
a Log object

getLog

public Log getLog()
Gets the log for today.

Returns:
a Log object

getLog

public Log getLog(int year,
                  int month)
Gets the log for a given year and month.

Parameters:
year - the year to get entries for
month - the month to get entries for
Returns:
a Log object

getLogSummary

public abstract LogSummary getLogSummary(int year,
                                         int month,
                                         int day)
Gets the log summary information for the given year, month and day.

Parameters:
year - the year to get entries for
month - the month to get entries for
day - the day to get entries for
Returns:
a LogSummary object

getLogSummary

public LogSummary getLogSummary()
Gets the log summary for today.

Returns:
a LogSummary object

getLogSummary

public LogSummary getLogSummary(int year,
                                int month)
Gets the log summary information for the given year and month.

Parameters:
year - the year to get entries for
month - the month to get entries for
Returns:
a LogSummary object

getLogSummary

public LogSummary getLogSummary(int year)
Gets the log summary information for the given year.

Parameters:
year - the year to get entries for
Returns:
a LogSummary object


Copyright © 2003-2006, Simon Brown. All Rights Reserved.