Skip to content

Commit

Permalink
Merge pull request #161 from ericdahl/access-PatternLayout-default-date
Browse files Browse the repository at this point in the history
LOGBACK-927 Update logback-access Common Log Format to use MMM rather than MM for month
  • Loading branch information
tony19 committed Nov 21, 2013
2 parents d90d93e + 55c4d5d commit 7dd85b5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Expand Up @@ -56,7 +56,7 @@ public class CoreConstants {
/**
* Time format used in Common Log Format
*/
public static final String CLF_DATE_PATTERN = "dd/MM/yyyy:HH:mm:ss Z";
public static final String CLF_DATE_PATTERN = "dd/MMM/yyyy:HH:mm:ss Z";

/**
* The key used in locating the evaluator map in context's object map.
Expand Down
24 changes: 12 additions & 12 deletions logback-site/src/site/pages/demo.html
Expand Up @@ -354,18 +354,18 @@ <h2>Logback Access</h2>

<p>Here is a sample output for this appender.</p>

<div class="source"><pre>127.0.0.1 - - 22/01/2007:14:35:40 +0100 GET /logback-demo/ViewStatii.do HTTP/1.1 200 3660
127.0.0.1 - - 22/01/2007:14:35:41 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/01/2007:14:35:42 +0100 GET /logback-demo/lastLog/ HTTP/1.1 200 948
127.0.0.1 - - 22/01/2007:14:35:42 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/01/2007:14:35:43 +0100 GET /logback-demo/prime.jsp HTTP/1.1 200 1296
127.0.0.1 - - 22/01/2007:14:35:44 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/01/2007:14:35:45 +0100 GET /logback-demo/lottery.jsp HTTP/1.1 200 1209
127.0.0.1 - - 22/01/2007:14:35:46 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/01/2007:14:35:48 +0100 GET /logback-demo/reload.jsp HTTP/1.1 200 1335
127.0.0.1 - - 22/01/2007:14:35:49 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/01/2007:14:35:54 +0100 GET /logback-demo/login.jsp HTTP/1.1 200 1214
127.0.0.1 - - 22/01/2007:14:35:55 +0100 GET /logback-demo/Logout.do HTTP/1.1 200 1000</pre></div>
<div class="source"><pre>127.0.0.1 - - 22/Jan/2007:14:35:40 +0100 GET /logback-demo/ViewStatii.do HTTP/1.1 200 3660
127.0.0.1 - - 22/Jan/2007:14:35:41 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/Jan/2007:14:35:42 +0100 GET /logback-demo/lastLog/ HTTP/1.1 200 948
127.0.0.1 - - 22/Jan/2007:14:35:42 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/Jan/2007:14:35:43 +0100 GET /logback-demo/prime.jsp HTTP/1.1 200 1296
127.0.0.1 - - 22/Jan/2007:14:35:44 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/Jan/2007:14:35:45 +0100 GET /logback-demo/lottery.jsp HTTP/1.1 200 1209
127.0.0.1 - - 22/Jan/2007:14:35:46 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/Jan/2007:14:35:48 +0100 GET /logback-demo/reload.jsp HTTP/1.1 200 1335
127.0.0.1 - - 22/Jan/2007:14:35:49 +0100 GET /logback-demo/index.jsp HTTP/1.1 200 2389
127.0.0.1 - - 22/Jan/2007:14:35:54 +0100 GET /logback-demo/login.jsp HTTP/1.1 200 1214
127.0.0.1 - - 22/Jan/2007:14:35:55 +0100 GET /logback-demo/Logout.do HTTP/1.1 200 1000</pre></div>

<h4>Filtering</h4>

Expand Down
12 changes: 6 additions & 6 deletions logback-site/src/site/pages/manual/layouts.html
Expand Up @@ -2075,13 +2075,13 @@ <h3 class="doAnchor" name="AccessPatternLayout">PatternLayout</h3>
<p>Outputs the date of the logging event. The date
conversion specifier may be followed by a set of braces
containing a date and time pattern strings used by
<code>java.text.SimpleDateFormat</code>. <em>ABSOLUTE</em>,
<em>DATE</em> or <em>ISO8601</em> are also valid values.
<code>java.text.SimpleDateFormat</code>. <em>ISO8601</em>
is also a valid value.
</p>
<p>For example, <b>%d{HH:mm:ss,SSS}</b>,
<b>%d{dd&#160;MMM&#160;yyyy&#160;;HH:mm:ss,SSS}</b> or
<b>%d{DATE}</b>. If no date format specifier is given then
ISO8601 format is assumed.
<p>For example, <b>%t{HH:mm:ss,SSS}</b> or
<b>%t{dd&nbsp;MMM&nbsp;yyyy&nbsp;;HH:mm:ss,SSS}</b>.
If no date format specifier is given then the
Common Log Format date format is assumed, that is: <b>%t{dd/MMM/yyyy:HH:mm:ss&nbsp;Z}</b>
</p>
</td>
</tr>
Expand Down

0 comments on commit 7dd85b5

Please sign in to comment.