Package org.eclipse.jetty.server
Class NCSARequestLog
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.AbstractNCSARequestLog
org.eclipse.jetty.server.NCSARequestLog
- All Implemented Interfaces:
RequestLog,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
- Direct Known Subclasses:
AsyncNCSARequestLog
@Deprecated
@ManagedObject("NCSA standard format request log")
public class NCSARequestLog
extends AbstractNCSARequestLog
Deprecated.
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.server.RequestLog
RequestLog.Collection, RequestLog.Writer -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Create request log object with default settings.NCSARequestLog(String filename) Deprecated.Create request log object with specified output file name.NCSARequestLog(RequestLogWriter writer) Deprecated.Create request log object given a RequestLogWriter file name. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Retrieve the file name of the request log with the expanded date wildcard if the output is written to the disk usingRolloverFileOutputStream.Deprecated.Retrieve the output file name of the request log.Deprecated.Retrieve the file name date format string.intDeprecated.Retrieve the number of days before rotated log files are deleted.booleanisAppend()Deprecated.Retrieve append to log flag.voidsetAppend(boolean append) Deprecated.Set append to log flag.voidsetFilename(String filename) Deprecated.Set the output file name of the request log.voidsetFilenameDateFormat(String logFileDateFormat) Deprecated.Set the log file name date format.voidsetLogTimeZone(String tz) Deprecated.Set the timezone of the request log.voidsetRetainDays(int retainDays) Deprecated.Set the number of days before rotated log files are deleted.voidDeprecated.Write requestEntry out.Methods inherited from class org.eclipse.jetty.server.AbstractNCSARequestLog
getIgnorePaths, getLogCookies, getLogDateFormat, getLogLatency, getLogLocale, getLogServer, getLogTimeZone, getPreferProxiedForAddress, isExtended, isLogDispatch, log, setExtended, setIgnorePaths, setLogCookies, setLogDateFormat, setLogDispatch, setLogLatency, setLogLocale, setLogServer, setPreferProxiedForAddressMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
NCSARequestLog
public NCSARequestLog()Deprecated.Create request log object with default settings. -
NCSARequestLog
Deprecated.Create request log object with specified output file name.- Parameters:
filename- the file name for the request log. This may be in the format expected byRolloverFileOutputStream
-
NCSARequestLog
Deprecated.Create request log object given a RequestLogWriter file name.- Parameters:
writer- the writer which manages the output of the formatted string produced by theRequestLog
-
-
Method Details
-
setFilename
Deprecated.Set the output file name of the request log. The file name may be in the format expected byRolloverFileOutputStream.- Parameters:
filename- file name of the request log
-
setLogTimeZone
Deprecated.Description copied from class:AbstractNCSARequestLogSet the timezone of the request log.- Overrides:
setLogTimeZonein classAbstractNCSARequestLog- Parameters:
tz- timezone string
-
getFilename
Deprecated.Retrieve the output file name of the request log.- Returns:
- file name of the request log
-
getDatedFilename
Deprecated.Retrieve the file name of the request log with the expanded date wildcard if the output is written to the disk usingRolloverFileOutputStream.- Returns:
- file name of the request log, or null if not applicable
-
setRetainDays
public void setRetainDays(int retainDays) Deprecated.Set the number of days before rotated log files are deleted.- Parameters:
retainDays- number of days to keep a log file
-
getRetainDays
Deprecated.Retrieve the number of days before rotated log files are deleted.- Returns:
- number of days to keep a log file
-
setAppend
public void setAppend(boolean append) Deprecated.Set append to log flag.- Parameters:
append- true - request log file will be appended after restart, false - request log file will be overwritten after restart
-
isAppend
Deprecated.Retrieve append to log flag.- Returns:
- value of the flag
-
setFilenameDateFormat
Deprecated.Set the log file name date format.- Parameters:
logFileDateFormat- format string that is passed toRolloverFileOutputStream- See Also:
-
getFilenameDateFormat
Deprecated.Retrieve the file name date format string.- Returns:
- the log File Date Format
-
write
Deprecated.Description copied from class:AbstractNCSARequestLogWrite requestEntry out. (to disk or slf4j log)- Overrides:
writein classAbstractNCSARequestLog- Parameters:
requestEntry- the request entry- Throws:
IOException- if unable to write the entry
-
CustomRequestLoggiven format stringCustomRequestLog.EXTENDED_NCSA_FORMATwith aRequestLogWriter