    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.jigsaw.http.Logger

    java.lang.Object
       |
       +----org.w3c.jigsaw.http.Logger

public abstract class Logger
extends Object

The Logger class is the abstract class that loggers must implement. You can (should be able to) use several loggers at the same time.

##

errlog(Client, String)
  Log an error on behalf of some client object in the error log.
errlog(String)
  Log an error on behalf of the server object.
initialize(httpd)
  Initialize this logger for the provided server.
log(Request, Reply, int, long)
  Log normally a full handled request.
log(String)
  Log a message to the log.
shutdown()
  Shutdown this logger object.
sync()
  Flush any in core logger state back to disk.
trace(Client, String)
  Log a client trace.
trace(String)
  Log a server trace.

##

log

     public abstract void log(Request request,
                              Reply reply,
                              int nbytes,
                              long duration)

  Log normally a full handled request.

  Parameters:
    client - The client which made the request.
    request - The request that was handled.
    reply - The emitted reply to the client.
    nbytes - The number of bytes sent to this client.
    duration - The time it took to process the request.

log

     public abstract void log(String msg)

  Log a message to the log.

  Parameters:
    msg - The message to log.

errlog

     public abstract void errlog(Client client,
                                 String msg)

  Log an error on behalf of some client object in the error log.

  Parameters:
    client - The client for which the error occured.
    msg - The error message to log.

errlog

     public abstract void errlog(String msg)

  Log an error on behalf of the server object.

  Parameters:
    msg - The message to emit.

trace

     public abstract void trace(Client client,
                                String trace)

  Log a client trace. The client may be in some error state, so all access to the client parameter should be checked.

  Parameters:
    client - The client that wants to emit a trace.
    trace - The trace to log.

trace

     public abstract void trace(String msg)

  Log a server trace.

  Parameters:
    msg - The trace to emit.

sync

     public abstract void sync()

  Flush any in core logger state back to disk. Some loggers may use memory cache before writing any data to the disk this method ensures that there state is saved to stable storage.

shutdown

     public abstract void shutdown()

  Shutdown this logger object. Each server will close the shutdown method of the logger before shuting itself down.

initialize

     public abstract void initialize(httpd server)

  Initialize this logger for the provided server. No call to any methods of the logger will be made before this logger is initialized for some server.

  Parameters:
    server - The server to which this logger should be initialized.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index