Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty
Class NCSARequestLog

    java.lang.Object
      org.mortbay.component.AbstractLifeCycle
          org.mortbay.jetty.NCSARequestLog

All Implemented Interfaces:
  LifeCycle, RequestLog

    public class NCSARequestLog

extends AbstractLifeCycle
implements RequestLog

This `RequestLog` implementation outputs logs in the pseudo-standard NCSA common log format. Configuration options allow a choice between the standard Common Log Format (as used in the 3 log format) and the Combined Log Format (single log format). This log format can be output by most web servers, and almost all web log analysis software can understand these formats.

Author:
  Greg Wilkins, Nigel Canonizado

Nested Class Summary

Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
`LifeCycle.Listener`

Field Summary

Fields inherited from class org.mortbay.component.AbstractLifeCycle
`_listeners`

Constructor Summary
`NCSARequestLog()`
`NCSARequestLog(java.lang.String filename)`

Method Summary
`protected void` | `doStart()`
`protected void` | `doStop()`
`java.lang.String` | `getDatedFilename()`
`java.lang.String` | `getFilename()`
`java.lang.String` | `getFilenameDateFormat()`
`java.lang.String[]` | `getIgnorePaths()`
`boolean` | `getLogCookies()`
`java.lang.String` | `getLogDateFormat()`
`boolean` | `getLogLatency()`
`java.util.Locale` | `getLogLocale()`
`boolean` | `getLogServer()`
`java.lang.String` | `getLogTimeZone()`
`int` | `getRetainDays()`
`boolean` | `isAppend()`
`boolean` | `isExtended()`
`void` | `log(Request request, Response response)`
`protected void` | `logExtended(Request request, Response response, java.io.Writer writer)`
`void` | `setAppend(boolean append)`
`void` | `setExtended(boolean extended)`
`void` | `setFilename(java.lang.String filename)`
`void` | `setFilenameDateFormat(java.lang.String logFileDateFormat)` Set the log file date format.
`void` | `setIgnorePaths(java.lang.String[] ignorePaths)`
`void` | `setLogCookies(boolean logCookies)`
`void` | `setLogDateFormat(java.lang.String format)`
`void` | `setLogLatency(boolean logLatency)`
`void` | `setLogLocale(java.util.Locale logLocale)`
`void` | `setLogServer(boolean logServer)`
`void` | `setLogTimeZone(java.lang.String tz)`
`void` | `setPreferProxiedForAddress(boolean preferProxiedForAddress)`
`void` | `setRetainDays(int retainDays)`

Methods inherited from class org.mortbay.component.AbstractLifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

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

Methods inherited from interface org.mortbay.component.LifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Constructor Detail

### NCSARequestLog

    public NCSARequestLog()

### NCSARequestLog

    public NCSARequestLog(java.lang.String filename)

Parameters:
  `filename` - The filename for the request log. This may be in the format expected by `RolloverFileOutputStream`

Method Detail

### setFilename

    public void setFilename(java.lang.String filename)

  Parameters:
    `filename` - The filename for the request log. This may be in the format expected by `RolloverFileOutputStream`

### getFilename

    public java.lang.String getFilename()

### getDatedFilename

    public java.lang.String getDatedFilename()

### setLogDateFormat

    public void setLogDateFormat(java.lang.String format)

  Parameters:
    `format` - Format for the timestamps in the log file. If not set, the pre-formated request timestamp is used.

### getLogDateFormat

    public java.lang.String getLogDateFormat()

### setLogLocale

    public void setLogLocale(java.util.Locale logLocale)

### getLogLocale

    public java.util.Locale getLogLocale()

### setLogTimeZone

    public void setLogTimeZone(java.lang.String tz)

### getLogTimeZone

    public java.lang.String getLogTimeZone()

### setRetainDays

    public void setRetainDays(int retainDays)

### getRetainDays

    public int getRetainDays()

### setExtended

    public void setExtended(boolean extended)

### isExtended

    public boolean isExtended()

### setAppend

    public void setAppend(boolean append)

### isAppend

    public boolean isAppend()

### setIgnorePaths

    public void setIgnorePaths(java.lang.String[] ignorePaths)

### getIgnorePaths

    public java.lang.String[] getIgnorePaths()

### setLogCookies

    public void setLogCookies(boolean logCookies)

### getLogCookies

    public boolean getLogCookies()

### getLogServer

    public boolean getLogServer()

### setLogServer

    public void setLogServer(boolean logServer)

### setLogLatency

    public void setLogLatency(boolean logLatency)

### getLogLatency

    public boolean getLogLatency()

### setPreferProxiedForAddress

    public void setPreferProxiedForAddress(boolean preferProxiedForAddress)

### log

    public void log(Request request,
                    Response response)

  Specified by:
    `log` in interface `RequestLog`

### logExtended

    protected void logExtended(Request request,
                               Response response,
                               java.io.Writer writer)
                        throws java.io.IOException

  Throws:
    `java.io.IOException`

### doStart

    protected void doStart()
                    throws java.lang.Exception

  Overrides:
    `doStart` in class `AbstractLifeCycle`
  Throws:
    `java.lang.Exception`

### doStop

    protected void doStop()
                   throws java.lang.Exception

  Overrides:
    `doStop` in class `AbstractLifeCycle`
  Throws:
    `java.lang.Exception`

### getFilenameDateFormat

    public java.lang.String getFilenameDateFormat()

  Returns:
    the log File Date Format

### setFilenameDateFormat

    public void setFilenameDateFormat(java.lang.String logFileDateFormat)

  Set the log file date format.

  Parameters:
    `logFileDateFormat` - the logFileDateFormat to pass to `RolloverFileOutputStream`
  See Also:
    `RolloverFileOutputStream#RolloverFileOutputStream(String, boolean, int, TimeZone, String, String)}`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.