blob: f5877c2f6e50bef0523d3f0d966676d077f0be08 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.13) on Tue Feb 08 12:40:05 CST 2022 -->
<title>CustomRequestLog (Eclipse Jetty API Doc - v10.0.8)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-02-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CustomRequestLog (Eclipse Jetty API Doc - v10.0.8)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":9,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CustomRequestLog.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.eclipse.jetty.server</a></div>
<h2 title="Class CustomRequestLog" class="title">Class CustomRequestLog</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">org.eclipse.jetty.util.component.AbstractLifeCycle</a></li>
<li>
<ul class="inheritance">
<li><a href="../util/component/ContainerLifeCycle.html" title="class in org.eclipse.jetty.util.component">org.eclipse.jetty.util.component.ContainerLifeCycle</a></li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.server.CustomRequestLog</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="RequestLog.html" title="interface in org.eclipse.jetty.server">RequestLog</a></code>, <code><a href="../util/component/Container.html" title="interface in org.eclipse.jetty.util.component">Container</a></code>, <code><a href="../util/component/Destroyable.html" title="interface in org.eclipse.jetty.util.component">Destroyable</a></code>, <code><a href="../util/component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></code>, <code><a href="../util/component/Dumpable.DumpableContainer.html" title="interface in org.eclipse.jetty.util.component">Dumpable.DumpableContainer</a></code>, <code><a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></code></dd>
</dl>
<hr>
<pre><a href="../util/annotation/ManagedObject.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedObject</a>("Custom format request log")
public class <span class="typeNameLabel">CustomRequestLog</span>
extends <a href="../util/component/ContainerLifeCycle.html" title="class in org.eclipse.jetty.util.component">ContainerLifeCycle</a>
implements <a href="RequestLog.html" title="interface in org.eclipse.jetty.server">RequestLog</a></pre>
<div class="block"><p>A flexible RequestLog, which produces log strings in a customizable format.</p>
<p>The Logger takes a format string where request characteristics can be added using "%" format codes which are
replaced by the corresponding value in the log output.</p>
<p>The terms server, client, local and remote are used to refer to the different addresses and ports
which can be logged. Server and client refer to the logical addresses which can be modified in the request
headers. Where local and remote refer to the physical addresses which may be a proxy between the
end-user and the server.</p>
<!-- tag::documentation[] -->
<p>Format codes are specified with the syntax <code>%MODIFIERS{PARAM}CODE</code> as follows:</p>
<dl>
<dt>MODIFIERS</dt>
<dd>Optional list of comma separated HTTP status codes which may be preceded by a single "!" to indicate
negation. If the status code is not in the list the literal string "-" will be logged instead of
the resulting value from the percent code.</dd>
<dt>{PARAM}</dt>
<dd>Parameter string which may be optional depending on the percent code used.</dd>
<dt>CODE</dt>
<dd>A one or two character code specified by the table of format codes below.</dd>
</dl>
<table>
<caption>Format Codes</caption>
<tr>
<th>Format String</th>
<th>Description</th>
</tr>
<tr>
<td>X</td>
<td>
<p>The X character.</p>
</td>
</tr>
<tr>
<td>%%</td>
<td>
<p>The percent character.</p>
</td>
</tr>
<tr>
<td>%{format}a</td>
<td>
<p>The address or host name.</p>
<p>Valid format values are: "server", "client", "local", "remote".
The format parameter is optional and defaults to "server".</p>
<p>Values "server" and "client" are the logical addresses which can be modified in the request headers,
while "local" and "remote" are the physical addresses so may be the addresses of a proxy between
the end-user and the server.</p>
</td>
</tr>
<tr>
<td>%{format}p</td>
<td>
<p>The port.</p>
<p>Valid format values are: "server", "client", "local", "remote".
The format parameter is optional and defaults to "server".</p>
<p>Values "server" and "client" are the logical ports which can be modified in the request headers,
while "local" and "remote" are the physical ports so may be the ports of a proxy between
the end-user and the server.</p>
</td>
</tr>
<tr>
<td>%{CLF}I</td>
<td>
<p>The size of request in bytes, excluding HTTP headers.</p>
<p>The parameter is optional.
When the parameter value is "CLF" the Common Log Format is used, i.e. a <code>-</code> rather than a <code>0</code>
when no bytes are present.</p>
</td>
</tr>
<tr>
<td>%{CLF}O</td>
<td>
<p>The size of response in bytes, excluding HTTP headers.</p>
<p>The parameter is optional.
When the parameter value is "CLF" the Common Log Format is used, i.e. a <code>-</code> rather than a <code>0</code>
when no bytes are present.</p>
</td>
</tr>
<tr>
<td>%{CLF}S</td>
<td>
<p>The bytes transferred (received and sent). This is the combination of <code>%I</code> and <code>%O</code>.</p>
<p>The parameter is optional.
When the parameter value is "CLF" the Common Log Format is used, i.e. a <code>-</code> rather than a <code>0</code>
when no bytes are present.</p>
</td>
</tr>
<tr>
<td>%{VARNAME}C</td>
<td>
<p>The value of the request cookie VARNAME.</p>
<p>The parameter is optional.
Only version 0 cookies are fully supported.
When the parameter is missing, all request cookies will be logged.</p>
</td>
</tr>
<tr>
<td>%D</td>
<td>
<p>The time taken to serve the request, in microseconds.</p>
</td>
</tr>
<tr>
<td>%{VARNAME}e</td>
<td>
<p>The value of the environment variable VARNAME.</p>
</td>
</tr>
<tr>
<td>%f</td>
<td>
<p>The file system path of the requested resource.</p>
</td>
</tr>
<tr>
<td>%H</td>
<td>
<p>The name and version of the request protocol, such as "HTTP/1.1".</p>
</td>
</tr>
<tr>
<td>%{VARNAME}i</td>
<td>
<p>The value of the VARNAME request header.</p>
</td>
</tr>
<tr>
<td>%k</td>
<td>
<p>The number of requests handled on a connection.</p>
<p>The initial request on a connection yields a value 0, the first request after the initial on the same connection
yields the value 1, the second request on the same connection yields the value 2, etc.</p>
</td>
</tr>
<tr>
<td>%m</td>
<td>
<p>The HTTP request method.</p>
</td>
</tr>
<tr>
<td>%{VARNAME}o</td>
<td>
<p>The value of the VARNAME response header.</p>
</td>
</tr>
<tr>
<td>%q</td>
<td>
<p>The query string, prepended with a ? if a query string exists, otherwise an empty string.</p>
</td>
</tr>
<tr>
<td>%r</td>
<td>
<p>First line of an HTTP/1.1 request (or equivalent information for HTTP/2 or later).</p>
</td>
</tr>
<tr>
<td>%R</td>
<td>
<p>The name of the Handler or Servlet generating the response (if any).</p>
</td>
</tr>
<tr>
<td>%s</td>
<td>
<p>The HTTP response status code.</p>
</td>
</tr>
<tr>
<td>%{format|timeZone|locale}t</td>
<td>
<p>The time at which the request was received.</p>
<p>The parameter is optional and may have the following values: {format}, {format|timeZone} or {format|timeZone|locale}.</p>
<dl>
<dt>format</dt>
<dd>Default is e.g. [18/Sep/2011:19:18:28 -0400] where the last number indicates the timezone offset from GMT.
Must be in a format supported by the <code>java.time</code> package.</dd>
<dt>timeZone</dt>
<dd>Default is GMT.
Must be in a format supported by the <code>java.time</code> package.</dd>
<dt>locale</dt>
<dd>Default is the JVM default locale.
Must be in a format supported by <code>java.util.Locale.forLanguageTag()</code>.</dd>
</dl>
</td>
</tr>
<tr>
<td>%{UNIT}T</td>
<td>
<p>The time taken to serve the request.</p>
<p>The parameter UNIT is optional and defaults to "s".
The parameter UNIT indicates the unit of time: "s" for seconds, "ms" for milliseconds, "us" for microseconds.
<code>%{us}T</code> is identical to <code>%D</code>.</p>
</td>
</tr>
<tr>
<td>%{d}u</td>
<td>
<p>The remote user if the request was authenticated with servlet authentication.</p>
<p>May be an invalid value if response status code (<code>%s</code>) is 401 (unauthorized).</p>
<p>The parameter is optional.
When the parameter value is "d", deferred authentication will also be checked.</p>
</td>
</tr>
<tr>
<td>%U</td>
<td>
<p>The URL path requested, not including any query string.</p>
</td>
</tr>
<tr>
<td>%X</td>
<td>
<p>The connection status when response is completed:</p>
<dl>
<dt>X</dt>
<dd>The connection is aborted before the response completed.</dd>
<dt>+</dt>
<dd>The connection may be kept alive after the response is sent.</dd>
<dt>-</dt>
<dd>The connection will be closed after the response is sent.</dd>
</dl>
</td>
</tr>
<tr>
<td>%{VARNAME}ti</td>
<td>
<p>The value of the VARNAME request trailer.</p>
</td>
</tr>
<tr>
<td>%{VARNAME}to</td>
<td>
<p>The value of the VARNAME response trailer.</p>
</td>
</tr>
</table>
<!-- end::documentation[] --></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../util/component/AbstractLifeCycle.AbstractLifeCycleListener.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle.AbstractLifeCycleListener</a>, <a href="../util/component/AbstractLifeCycle.StopException.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle.StopException</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.Container">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Container.html" title="interface in org.eclipse.jetty.util.component">Container</a></h3>
<code><a href="../util/component/Container.InheritedListener.html" title="interface in org.eclipse.jetty.util.component">Container.InheritedListener</a>, <a href="../util/component/Container.Listener.html" title="interface in org.eclipse.jetty.util.component">Container.Listener</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="../util/component/Dumpable.DumpableContainer.html" title="interface in org.eclipse.jetty.util.component">Dumpable.DumpableContainer</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.util.component.LifeCycle">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/LifeCycle.html" title="interface in org.eclipse.jetty.util.component">LifeCycle</a></h3>
<code><a href="../util/component/LifeCycle.Listener.html" title="interface in org.eclipse.jetty.util.component">LifeCycle.Listener</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.server.RequestLog">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.server.<a href="RequestLog.html" title="interface in org.eclipse.jetty.server">RequestLog</a></h3>
<code><a href="RequestLog.Collection.html" title="class in org.eclipse.jetty.server">RequestLog.Collection</a>, <a href="RequestLog.Writer.html" title="interface in org.eclipse.jetty.server">RequestLog.Writer</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_DATE_FORMAT">DEFAULT_DATE_FORMAT</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EXTENDED_NCSA_FORMAT">EXTENDED_NCSA_FORMAT</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static org.slf4j.Logger</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LOG">LOG</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#NCSA_FORMAT">NCSA_FORMAT</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../util/component/AbstractLifeCycle.html#FAILED">FAILED</a>, <a href="../util/component/AbstractLifeCycle.html#STARTED">STARTED</a>, <a href="../util/component/AbstractLifeCycle.html#STARTING">STARTING</a>, <a href="../util/component/AbstractLifeCycle.html#STOPPED">STOPPED</a>, <a href="../util/component/AbstractLifeCycle.html#STOPPING">STOPPING</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="../util/component/Dumpable.html#KEY">KEY</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">CustomRequestLog</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String)">CustomRequestLog</a></span>&#8203;(java.lang.String&nbsp;file)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String,java.lang.String)">CustomRequestLog</a></span>&#8203;(java.lang.String&nbsp;file,
java.lang.String&nbsp;format)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.eclipse.jetty.server.RequestLog.Writer,java.lang.String)">CustomRequestLog</a></span>&#8203;(<a href="RequestLog.Writer.html" title="interface in org.eclipse.jetty.server">RequestLog.Writer</a>&nbsp;writer,
java.lang.String&nbsp;formatString)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doStart()">doStart</a></span>()</code></th>
<td class="colLast">
<div class="block">Set up request logging and open log file.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected static java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAuthentication(org.eclipse.jetty.server.Request,boolean)">getAuthentication</a></span>&#8203;(<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;request,
boolean&nbsp;checkDeferred)</code></th>
<td class="colLast">
<div class="block">Extract the user authentication</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFormatString()">getFormatString</a></span>()</code></th>
<td class="colLast">
<div class="block">Retrieve the format string.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.String[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIgnorePaths()">getIgnorePaths</a></span>()</code></th>
<td class="colLast">
<div class="block">Retrieve the request paths that will not be logged.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="RequestLog.Writer.html" title="interface in org.eclipse.jetty.server">RequestLog.Writer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getWriter()">getWriter</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#log(org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Response)">log</a></span>&#8203;(<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;request,
<a href="Response.html" title="class in org.eclipse.jetty.server">Response</a>&nbsp;response)</code></th>
<td class="colLast">
<div class="block">Writes the request and response information to the output stream.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFilter(java.util.function.BiPredicate)">setFilter</a></span>&#8203;(java.util.function.BiPredicate&lt;<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>,&#8203;<a href="Response.html" title="class in org.eclipse.jetty.server">Response</a>&gt;&nbsp;filter)</code></th>
<td class="colLast">
<div class="block">This allows you to set a custom filter to decide whether to log a request or omit it from the request log.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setIgnorePaths(java.lang.String%5B%5D)">setIgnorePaths</a></span>&#8203;(java.lang.String[]&nbsp;ignorePaths)</code></th>
<td class="colLast">
<div class="block">Set request paths that will not be logged.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.ContainerLifeCycle">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/ContainerLifeCycle.html" title="class in org.eclipse.jetty.util.component">ContainerLifeCycle</a></h3>
<code><a href="../util/component/ContainerLifeCycle.html#addBean(java.lang.Object)">addBean</a>, <a href="../util/component/ContainerLifeCycle.html#addBean(java.lang.Object,boolean)">addBean</a>, <a href="../util/component/ContainerLifeCycle.html#addEventListener(java.util.EventListener)">addEventListener</a>, <a href="../util/component/ContainerLifeCycle.html#addManaged(org.eclipse.jetty.util.component.LifeCycle)">addManaged</a>, <a href="../util/component/ContainerLifeCycle.html#contains(java.lang.Object)">contains</a>, <a href="../util/component/ContainerLifeCycle.html#destroy()">destroy</a>, <a href="../util/component/ContainerLifeCycle.html#doStop()">doStop</a>, <a href="../util/component/ContainerLifeCycle.html#dump()">dump</a>, <a href="../util/component/ContainerLifeCycle.html#dump(java.lang.Appendable)">dump</a>, <a href="../util/component/ContainerLifeCycle.html#dump(java.lang.Appendable,java.lang.String)">dump</a>, <a href="../util/component/ContainerLifeCycle.html#dumpObjects(java.lang.Appendable,java.lang.String,java.lang.Object...)">dumpObjects</a>, <a href="../util/component/ContainerLifeCycle.html#dumpStdErr()">dumpStdErr</a>, <a href="../util/component/ContainerLifeCycle.html#getBean(java.lang.Class)">getBean</a>, <a href="../util/component/ContainerLifeCycle.html#getBeans()">getBeans</a>, <a href="../util/component/ContainerLifeCycle.html#getBeans(java.lang.Class)">getBeans</a>, <a href="../util/component/ContainerLifeCycle.html#getContainedBeans(java.lang.Class)">getContainedBeans</a>, <a href="../util/component/ContainerLifeCycle.html#getContainedBeans(java.lang.Class,java.util.Collection)">getContainedBeans</a>, <a href="../util/component/ContainerLifeCycle.html#isAuto(java.lang.Object)">isAuto</a>, <a href="../util/component/ContainerLifeCycle.html#isManaged(java.lang.Object)">isManaged</a>, <a href="../util/component/ContainerLifeCycle.html#isUnmanaged(java.lang.Object)">isUnmanaged</a>, <a href="../util/component/ContainerLifeCycle.html#manage(java.lang.Object)">manage</a>, <a href="../util/component/ContainerLifeCycle.html#removeBean(java.lang.Object)">removeBean</a>, <a href="../util/component/ContainerLifeCycle.html#removeBeans()">removeBeans</a>, <a href="../util/component/ContainerLifeCycle.html#removeEventListener(java.util.EventListener)">removeEventListener</a>, <a href="../util/component/ContainerLifeCycle.html#setBeans(java.util.Collection)">setBeans</a>, <a href="../util/component/ContainerLifeCycle.html#start(org.eclipse.jetty.util.component.LifeCycle)">start</a>, <a href="../util/component/ContainerLifeCycle.html#stop(org.eclipse.jetty.util.component.LifeCycle)">stop</a>, <a href="../util/component/ContainerLifeCycle.html#unmanage(java.lang.Object)">unmanage</a>, <a href="../util/component/ContainerLifeCycle.html#updateBean(java.lang.Object,java.lang.Object)">updateBean</a>, <a href="../util/component/ContainerLifeCycle.html#updateBean(java.lang.Object,java.lang.Object,boolean)">updateBean</a>, <a href="../util/component/ContainerLifeCycle.html#updateBeans(java.lang.Object%5B%5D,java.lang.Object%5B%5D)">updateBeans</a>, <a href="../util/component/ContainerLifeCycle.html#updateBeans(java.util.Collection,java.util.Collection)">updateBeans</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.AbstractLifeCycle">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/AbstractLifeCycle.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle</a></h3>
<code><a href="../util/component/AbstractLifeCycle.html#getEventListeners()">getEventListeners</a>, <a href="../util/component/AbstractLifeCycle.html#getState()">getState</a>, <a href="../util/component/AbstractLifeCycle.html#getState(org.eclipse.jetty.util.component.LifeCycle)">getState</a>, <a href="../util/component/AbstractLifeCycle.html#isFailed()">isFailed</a>, <a href="../util/component/AbstractLifeCycle.html#isRunning()">isRunning</a>, <a href="../util/component/AbstractLifeCycle.html#isStarted()">isStarted</a>, <a href="../util/component/AbstractLifeCycle.html#isStarting()">isStarting</a>, <a href="../util/component/AbstractLifeCycle.html#isStopped()">isStopped</a>, <a href="../util/component/AbstractLifeCycle.html#isStopping()">isStopping</a>, <a href="../util/component/AbstractLifeCycle.html#setEventListeners(java.util.Collection)">setEventListeners</a>, <a href="../util/component/AbstractLifeCycle.html#start()">start</a>, <a href="../util/component/AbstractLifeCycle.html#stop()">stop</a>, <a href="../util/component/AbstractLifeCycle.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.Container">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Container.html" title="interface in org.eclipse.jetty.util.component">Container</a></h3>
<code><a href="../util/component/Container.html#getCachedBeans(java.lang.Class)">getCachedBeans</a>, <a href="../util/component/Container.html#getEventListeners()">getEventListeners</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.Dumpable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Dumpable.html" title="interface in org.eclipse.jetty.util.component">Dumpable</a></h3>
<code><a href="../util/component/Dumpable.html#dumpSelf()">dumpSelf</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.util.component.Dumpable.DumpableContainer">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.jetty.util.component.<a href="../util/component/Dumpable.DumpableContainer.html" title="interface in org.eclipse.jetty.util.component">Dumpable.DumpableContainer</a></h3>
<code><a href="../util/component/Dumpable.DumpableContainer.html#isDumpable(java.lang.Object)">isDumpable</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="LOG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
<pre>protected static final&nbsp;org.slf4j.Logger LOG</pre>
</li>
</ul>
<a id="DEFAULT_DATE_FORMAT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_DATE_FORMAT</h4>
<pre>public static final&nbsp;java.lang.String DEFAULT_DATE_FORMAT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.eclipse.jetty.server.CustomRequestLog.DEFAULT_DATE_FORMAT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="NCSA_FORMAT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>NCSA_FORMAT</h4>
<pre>public static final&nbsp;java.lang.String NCSA_FORMAT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.eclipse.jetty.server.CustomRequestLog.NCSA_FORMAT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EXTENDED_NCSA_FORMAT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EXTENDED_NCSA_FORMAT</h4>
<pre>public static final&nbsp;java.lang.String EXTENDED_NCSA_FORMAT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.eclipse.jetty.server.CustomRequestLog.EXTENDED_NCSA_FORMAT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CustomRequestLog</h4>
<pre>public&nbsp;CustomRequestLog()</pre>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CustomRequestLog</h4>
<pre>public&nbsp;CustomRequestLog&#8203;(java.lang.String&nbsp;file)</pre>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CustomRequestLog</h4>
<pre>public&nbsp;CustomRequestLog&#8203;(java.lang.String&nbsp;file,
java.lang.String&nbsp;format)</pre>
</li>
</ul>
<a id="&lt;init&gt;(org.eclipse.jetty.server.RequestLog.Writer,java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>CustomRequestLog</h4>
<pre>public&nbsp;CustomRequestLog&#8203;(<a href="RequestLog.Writer.html" title="interface in org.eclipse.jetty.server">RequestLog.Writer</a>&nbsp;writer,
java.lang.String&nbsp;formatString)</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="setFilter(java.util.function.BiPredicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFilter</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setFilter&#8203;(java.util.function.BiPredicate&lt;<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>,&#8203;<a href="Response.html" title="class in org.eclipse.jetty.server">Response</a>&gt;&nbsp;filter)</pre>
<div class="block">This allows you to set a custom filter to decide whether to log a request or omit it from the request log.
This filter is evaluated after path filtering is applied from <a href="#setIgnorePaths(java.lang.String%5B%5D)"><code>setIgnorePaths(String[])</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>filter</code> - - a BiPredicate which returns true if this request should be logged.</dd>
</dl>
</li>
</ul>
<a id="getWriter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWriter</h4>
<pre class="methodSignature"><a href="../util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>("The RequestLogWriter")
public&nbsp;<a href="RequestLog.Writer.html" title="interface in org.eclipse.jetty.server">RequestLog.Writer</a>&nbsp;getWriter()</pre>
</li>
</ul>
<a id="log(org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Response)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>log</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;log&#8203;(<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;request,
<a href="Response.html" title="class in org.eclipse.jetty.server">Response</a>&nbsp;response)</pre>
<div class="block">Writes the request and response information to the output stream.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="RequestLog.html#log(org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Response)">log</a></code>&nbsp;in interface&nbsp;<code><a href="RequestLog.html" title="interface in org.eclipse.jetty.server">RequestLog</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - The request to log.</dd>
<dd><code>response</code> - The response to log. Note that for some requests
the response instance may not have been fully populated (Eg 400 bad request
responses are sent without a servlet response object). Thus for basic
log information it is best to consult <a href="Response.html#getCommittedMetaData()"><code>Response.getCommittedMetaData()</code></a>
and <a href="Response.html#getHttpChannel()"><code>Response.getHttpChannel()</code></a> directly.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="RequestLog.html#log(org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Response)"><code>RequestLog.log(Request, Response)</code></a></dd>
</dl>
</li>
</ul>
<a id="getAuthentication(org.eclipse.jetty.server.Request,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthentication</h4>
<pre class="methodSignature">protected static&nbsp;java.lang.String&nbsp;getAuthentication&#8203;(<a href="Request.html" title="class in org.eclipse.jetty.server">Request</a>&nbsp;request,
boolean&nbsp;checkDeferred)</pre>
<div class="block">Extract the user authentication</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - The request to extract from</dd>
<dd><code>checkDeferred</code> - Whether to check for deferred authentication</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The string to log for authenticated user.</dd>
</dl>
</li>
</ul>
<a id="setIgnorePaths(java.lang.String[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIgnorePaths</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setIgnorePaths&#8203;(java.lang.String[]&nbsp;ignorePaths)</pre>
<div class="block">Set request paths that will not be logged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ignorePaths</code> - array of request paths</dd>
</dl>
</li>
</ul>
<a id="getIgnorePaths()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIgnorePaths</h4>
<pre class="methodSignature">public&nbsp;java.lang.String[]&nbsp;getIgnorePaths()</pre>
<div class="block">Retrieve the request paths that will not be logged.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>array of request paths</dd>
</dl>
</li>
</ul>
<a id="getFormatString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFormatString</h4>
<pre class="methodSignature"><a href="../util/annotation/ManagedAttribute.html" title="annotation in org.eclipse.jetty.util.annotation">@ManagedAttribute</a>("format string")
public&nbsp;java.lang.String&nbsp;getFormatString()</pre>
<div class="block">Retrieve the format string.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the format string</dd>
</dl>
</li>
</ul>
<a id="doStart()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>doStart</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;doStart()
throws java.lang.Exception</pre>
<div class="block">Set up request logging and open log file.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../util/component/ContainerLifeCycle.html#doStart()">doStart</a></code>&nbsp;in class&nbsp;<code><a href="../util/component/ContainerLifeCycle.html" title="class in org.eclipse.jetty.util.component">ContainerLifeCycle</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../util/component/AbstractLifeCycle.StopException.html" title="class in org.eclipse.jetty.util.component">AbstractLifeCycle.StopException</a></code> - If thrown, the lifecycle will immediately be stopped.</dd>
<dd><code>java.lang.Exception</code> - If there was a problem starting. Will cause a transition to FAILED state</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../util/component/AbstractLifeCycle.html#doStart()"><code>AbstractLifeCycle.doStart()</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CustomRequestLog.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2022 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>