## org.w3c.jigsaw.http
Class Logger

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

Direct Known Subclasses:
  CommonLogger

public abstract class Logger
extends java.lang.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.

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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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(java.lang.String msg)

  Log a message to the log.
  Parameters:
    `msg` - The message to log.

### errlog

    public abstract void errlog(Client client,
                                java.lang.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(java.lang.String msg)

  Log an error on behalf of the server object.
  Parameters:
    `msg` - The message to emit.

### trace

    public abstract void trace(Client client,
                               java.lang.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(java.lang.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.