logback-dev
Threads by month
- ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
March 2007
- 7 participants
- 175 discussions

svn commit: r1387 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers
by noreply.seb@qos.ch 05 Mar '07
by noreply.seb@qos.ch 05 Mar '07
05 Mar '07
Author: seb
Date: Mon Mar 5 10:56:58 2007
New Revision: 1387
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/CyclicBuffer.java
Log:
Added a clear method to the CyclicBuffer
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/CyclicBuffer.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/CyclicBuffer.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/helpers/CyclicBuffer.java Mon Mar 5 10:56:58 2007
@@ -43,12 +43,24 @@
throw new IllegalArgumentException("The maxSize argument (" + maxSize
+ ") is not a positive integer.");
}
+ init(maxSize);
+ }
+
+ private void init(int maxSize) {
this.maxSize = maxSize;
ea = (E[]) new Object[maxSize];
first = 0;
last = 0;
numElems = 0;
}
+
+ /**
+ * Clears the buffer
+ * and resets all attributes.
+ */
+ public void clear() {
+ init(this.maxSize);
+ }
/**
* Add an <code>event</code> as the last event in the buffer.
1
0

03 Mar '07
http://bugzilla.qos.ch/show_bug.cgi?id=51
Summary: OSGi Execution Environment/Minimum JDK
Product: logback-general
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS
Status: NEW
Severity: blocker
Priority: P1
Component: build-structure
AssignedTo: logback-dev(a)qos.ch
ReportedBy: sdavids(a)gmx.de
The OSGi Execution Environment and/or the minimum JDK should be mentioned in
the FAQ, release notes, and readme.
Also, MANIFEST.MF should be marked appropriately
(Bundle-RequiredExecutionEnvironment directive).
http://wiki.eclipse.org/index.php/Execution_Environments#Standard_Execution…
http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_3.html#Ap…
--
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
1
0
http://bugzilla.qos.ch/show_bug.cgi?id=50
Summary: Provide links to externals
Product: logback-site
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P1
Component: Documentation
AssignedTo: logback-dev(a)qos.ch
ReportedBy: sdavids(a)gmx.de
Provide at least links to SLF4J on the documentation pages and possibly on the
main menu.
--
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
1
0

[Bug 49] New: NoClassDefFoundError - org/slf4j/impl/MessageFormatter
by bugzilla-daemon@pixie.qos.ch 03 Mar '07
by bugzilla-daemon@pixie.qos.ch 03 Mar '07
03 Mar '07
http://bugzilla.qos.ch/show_bug.cgi?id=49
Summary: NoClassDefFoundError - org/slf4j/impl/MessageFormatter
Product: logback-classic
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P1
Component: Other
AssignedTo: logback-dev(a)qos.ch
ReportedBy: sdavids(a)gmx.de
LogBack 0.9
Exception in thread "main" java.lang.NoClassDefFoundError:
org/slf4j/impl/MessageFormatter
at
ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:114)
at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:421)
at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:430)
at ch.qos.logback.classic.Logger.warn(Logger.java:582)
at name.davids.sebastian.example.logback.Main.main(Main.java:73)
This has been moved to package org.slf4j.helpers
--
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
1
4

svn commit: r1386 - logback/trunk/logback-site/src/site/pages/manual
by noreply.ceki@qos.ch 02 Mar '07
by noreply.ceki@qos.ch 02 Mar '07
02 Mar '07
Author: ceki
Date: Fri Mar 2 22:31:46 2007
New Revision: 1386
Modified:
logback/trunk/logback-site/src/site/pages/manual/index_menu.js
logback/trunk/logback-site/src/site/pages/manual/layouts.html
Log:
ongoing work
Modified: logback/trunk/logback-site/src/site/pages/manual/index_menu.js
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/index_menu.js (original)
+++ logback/trunk/logback-site/src/site/pages/manual/index_menu.js Fri Mar 2 22:31:46 2007
@@ -1,5 +1,5 @@
-document.write('<p class="menu_header">Manual</p>')
+document.write('<p class="menu_header">Chapter Index</p>')
document.write('<p class="menu"><a href="introduction.html"><b>Ch1: Introduction to logback</b></a></p>');
document.write('<p class="menu"><a href="architecture.html"><b>Ch2: Architecture</b></a>');
document.write('<p class="menu"><a href="joran.html"><b>Ch3: Logback configuration with Joran</b></a>');
Modified: logback/trunk/logback-site/src/site/pages/manual/layouts.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/layouts.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/layouts.html Fri Mar 2 22:31:46 2007
@@ -248,8 +248,6 @@
}</pre></div>
- <!-- ====================== XXXXXXXXXXXXx -->
-
<p>The addition of the corresponding setter method is all that is
needed to enable the configuration of an option. Note that the
<code>PrintThreadName</code> option is boolean and not
@@ -702,27 +700,18 @@
context) associated with the thread that
generated the logging event.
</p>
- <p>
- If
- <b>mdc</b>
- conversion word is followed by a key
- between braces, as in <b>%mdc{clientNumber}</b>,
- then the value in the MDC corresponding
- to the key will be output.
+
+ <p>If <b>mdc</b> conversion word is followed by a key
+ between braces, as in <b>%mdc{clientNumber}</b>, then the
+ value in the MDC corresponding to the key will be output.
</p>
- <p>
- If no option is given, then
- the entire content of the MDC will be output in the format
- "key1=val1, key2=val2".
+
+ <p>If no option is given, then the entire content of the MDC
+ will be output in the format "key1=val1, key2=val2".
</p>
- <p>
- See
- <a
- href="http://logback.qos.ch/apidocs/ch/qos/logback/classic/MDC.html">
- MDC
- </a>
- class for more details.
+ <p>See <a href="mdc.html">Chapter 7</a> for more details on
+ the MDC.
</p>
</td>
@@ -752,12 +741,12 @@
<p>Here are some examples:</p>
- <table BORDER="1" CELLPADDING="8">
+ <table class="bodyTable" CELLPADDING="8">
<tr class="a">
<th>Conversion Pattern</th>
<th>Result</th>
</tr>
- <tr class="a">
+ <tr class="b">
<td>%ex</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)
@@ -769,7 +758,7 @@
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)</pre></td>
</tr>
- <tr class="a">
+ <tr class="b">
<td>%ex{full}</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)
@@ -790,7 +779,7 @@
using <b>%ex{full, EX_DISPLAY_EVAL}</b> will display the full
stacktrace of the exception, only if the evaluator called <em>EX_DISPLAY_EVAL</em>
returns a <b>negative</b> answer. Evaluators are described
- further down this document.
+ further down in this document.
</p>
</td>
</tr>
@@ -801,9 +790,10 @@
</td>
<td>
- <p>
- Used to output the marker associated with the logger request.
+ <p>Used to output the marker associated with the logger
+ request.
</p>
+
<p>
If there is a single marker available, its name is displayed.
In case the marker has children markers, the converter displays
@@ -824,58 +814,55 @@
</tr>
</table>
- <p>
- By default the relevant information is output as is.
- However, with the aid of format modifiers it is possible to
- change the minimum field width, the maximum field width and
- justification.
- </p>
- <p>
- The optional format modifier is placed between the percent
- sign and the conversion character or word.
- </p>
- <p>
- The first optional format modifier is the
- <em>left justification flag</em>
- which is just the minus (-) character. Then comes the
- optional
- <em>minimum field width</em>
- modifier. This is a decimal constant that represents the
- minimum number of characters to output. If the data item
- contains fewer characters, it is padded on either the left
- or the right until the minimum width is reached. The default
- is to pad on the left (right justify) but you can specify
- right padding with the left justification flag. The padding
- character is space. If the data item is larger than the
- minimum field width, the field is expanded to accommodate
- the data. The value is never truncated.
- </p>
- <p>
- This behavior can be changed using the
- <em>maximum field width</em>
- modifier which is designated by a period followed by a
- decimal constant. If the data item is longer than the
- maximum field, then the extra characters are removed from
- the <em>beginning</em>
- of the data item. For example, if the
- maximum field width is eight and the data item is ten
- characters long, then the first two characters of the data
- item are dropped. This behavior deviates from the printf
- function in C where truncation is done from the end.
- </p>
- <p>
- Truncation from the end is possible by appending a minus
- character right after the period. In that case, if the
- maximum field width is eight and the data item is ten
- characters long, then the last two characters of the data
- item are dropped.
+
+
+ <h2>Format modifiers</h2>
+
+ <p>By default the relevant information is output as is. However,
+ with the aid of format modifiers it is possible to change the
+ minimum field width, the maximum field width as well as
+ justification.
</p>
- <p>
- Below are various format modifier examples for the logger
- conversion specifier.
+
+ <p>The optional format modifier is placed between the percent sign
+ and the conversion character or word.
+ </p>
+
+ <p>The first optional format modifier is the <em>left
+ justification flag</em> which is just the minus (-)
+ character. Then comes the optional <em>minimum field width</em>
+ modifier. This is a decimal constant that represents the minimum
+ number of characters to output. If the data item contains fewer
+ characters, it is padded on either the left or the right until the
+ minimum width is reached. The default is to pad on the left (right
+ justify) but you can specify right padding with the left
+ justification flag. The padding character is space. If the data
+ item is larger than the minimum field width, the field is expanded
+ to accommodate the data. The value is never truncated.
</p>
- <table BORDER="1" CELLPADDING="8">
+ <p>This behavior can be changed using the <em>maximum field
+ width</em> modifier which is designated by a period followed by a
+ decimal constant. If the data item is longer than the maximum
+ field, then the extra characters are removed from the
+ <em>beginning</em> of the data item. For example, if the maximum
+ field width is eight and the data item is ten characters long,
+ then the first two characters of the data item are dropped. This
+ behavior deviates from the printf function in C where truncation
+ is done from the end.
+ </p>
+
+ <p>Truncation from the end is possible by appending a minus
+ character right after the period. In that case, if the maximum
+ field width is eight and the data item is ten characters long,
+ then the last two characters of the data item are dropped.
+ </p>
+
+ <p>Below are various format modifier examples for the logger
+ conversion specifier.
+ </p>
+
+ <table class="bodyTable" BORDER="0" CELLPADDING="8">
<th>Format modifier</th>
<th>Left justify</th>
<th>Minimum width</th>
@@ -892,7 +879,7 @@
than 20 characters long.
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center">%-20logger</td>
<td align="center">true</td>
<td align="center">20</td>
@@ -912,7 +899,7 @@
longer than 30 characters.
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center">%20.30logger</td>
<td align="center">false</td>
<td align="center">20</td>
@@ -936,7 +923,7 @@
<em>beginning</em>.
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center">%.-30logger</td>
<td align="center">NA</td>
<td align="center">none</td>
@@ -951,7 +938,7 @@
<p>Here are some examples of the format modifier truncation:</p>
- <table BORDER="1" CELLPADDING="8">
+ <table class="bodyTable" BORDER="0" CELLPADDING="8">
<th>Format modifier</th>
<th>Logger name</th>
<th>Result</th>
@@ -960,7 +947,7 @@
<td align="center">main.Name</td>
<td align="center"><pre>[main.Name ]</pre></td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center">[%20.-20logger]</td>
<td align="center">main.Name</td>
<td align="center"><pre>[ main.Name]</pre></td>
@@ -970,7 +957,7 @@
<td align="center">main.foo.foo.bar.Name</td>
<td align="center"><pre>[o.bar.Name]</pre></td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center">[%10.-10logger]</td>
<td align="center">main.foo.foo.bar.Name</td>
<td align="center"><pre>[main.foo.f]</pre></td>
@@ -1451,7 +1438,7 @@
<p>Here are the conversion specifier one can use with logback access
<code>PatternLayout</code>.</p>
- <table border="1" CELLPADDING="8">
+ <table class="bodyTable" border="0" CELLPADDING="8">
<th align="center">Conversion Word</th>
<th align="center">Effect</th>
@@ -1463,7 +1450,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>A / localIP</b></td>
<td>
<p>
@@ -1479,7 +1466,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>h / clientHost</b></td>
<td>
<p>
@@ -1495,7 +1482,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>l</b></td>
<td>
<p>
@@ -1517,7 +1504,7 @@
displays the corresponding parameter.</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>i{header} / header{header}</b></td>
<td>
<p>
@@ -1539,7 +1526,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>r / requestURL</b></td>
<td>
<p>
@@ -1555,7 +1542,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>t / date</b></td>
<td>
<p>
@@ -1594,7 +1581,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>U / requestURI</b></td>
<td>
<p>
@@ -1610,7 +1597,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>localPort</b></td>
<td>
<p>
@@ -1630,7 +1617,7 @@
displays the corresponding attribute.</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>reqCookie{cookie}</b></td>
<td>
<p>
@@ -1652,7 +1639,7 @@
<p><b>%header{Referer}</b> displays the referer of the response.</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>requestContent</b></td>
<td>
<p>
@@ -1677,7 +1664,7 @@
</p>
</td>
</tr>
- <tr class="a">
+ <tr class="b">
<td align="center"><b>responseContent</b></td>
<td>
<p>
1
0

svn commit: r1385 - logback/trunk/logback-site/src/site/pages/manual
by noreply.ceki@qos.ch 02 Mar '07
by noreply.ceki@qos.ch 02 Mar '07
02 Mar '07
Author: ceki
Date: Fri Mar 2 22:17:10 2007
New Revision: 1385
Added:
logback/trunk/logback-site/src/site/pages/manual/index_menu.js
Modified:
logback/trunk/logback-site/src/site/pages/manual/appenders.html
logback/trunk/logback-site/src/site/pages/manual/architecture.html
logback/trunk/logback-site/src/site/pages/manual/contextSelector.html
logback/trunk/logback-site/src/site/pages/manual/filters.html
logback/trunk/logback-site/src/site/pages/manual/introduction.html
logback/trunk/logback-site/src/site/pages/manual/joran.html
logback/trunk/logback-site/src/site/pages/manual/layouts.html
logback/trunk/logback-site/src/site/pages/manual/mdc.html
Log:
The chpater index is now displayed on the right menu
Modified: logback/trunk/logback-site/src/site/pages/manual/appenders.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/appenders.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/appenders.html Fri Mar 2 22:17:10 2007
@@ -16,44 +16,18 @@
</script>
</div>
+
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
+
<div id="content">
- <h2>Chapter 4: Appenders</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
+ <h1>Chapter 4: Appenders</h1>
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>.
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
-
- <div class="highlight">
+ <script src="../templates/creative.js"></script>
+
+ <div class="highlight">
<p>
In order to run the examples in this chapter, you need
to make sure that certain jar files are present on the
@@ -63,7 +37,7 @@
</p>
</div>
- <h2>What is an Appender</h2>
+ <h2>What is an Appender?</h2>
<p>
Logback delegates the task of writing a logging event to appenders.
Modified: logback/trunk/logback-site/src/site/pages/manual/architecture.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/architecture.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/architecture.html Fri Mar 2 22:17:10 2007
@@ -14,58 +14,26 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
- <h2>Chapter 2: Architecture</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
+ <h1>Chapter 2: Architecture</h1>
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>
- .
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
+ <script src="../templates/creative.js"></script>
- <h2>Logback architecture</h2>
+ <h2>Logback's architecture</h2>
- <p>
- Logback's basic architecture is sufficiently generic so as to
+ <p>Logback's basic architecture is sufficiently generic so as to
apply under different circumstances. At present time, logback is
divided into three modules, Core, Classic and Access.
</p>
- <p>
- The <em>core</em> module lays the groundwork for the other two
+ <p>The <em>core</em> module lays the groundwork for the other two
modules. The <em>classic</em> module extends <em>core</em>. The
- classic module corresponds to a significantly improved
- version of log4j. Logback-classic natively implements the <a
+ classic module corresponds to a significantly improved version
+ of log4j. Logback-classic natively implements the <a
href="http://www.slf4j.org">SLF4J API</a> so that you can
readily switch back and forth between logback and other logging
systems such as log4j or JDK14 Logging. The third module called
Modified: logback/trunk/logback-site/src/site/pages/manual/contextSelector.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/contextSelector.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/contextSelector.html Fri Mar 2 22:17:10 2007
@@ -14,165 +14,135 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
- <h2>Chapter 8: Context Selector</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
-
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>.
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
-
-<h3>Introduction</h3>
+ <h2>Chapter 8: Context Selectors</h2>
-<p>
-When working with several Web applications, all running on one server, the
-multiplications of <code>LoggerContext</code> objects might reveal itself
-a tricky issue.
-</p>
-
-<p>
-Logback provides a simple yet powerful way of dealing with multiple
-contexts, without corruption of data, nor collusion between context
-instances.
-</p>
-
-<p>
-One thing we know is that JNDI environments are independant. Thus
-setting environment variables in each application will allow a given component
-to know which application it is dealing with at the moment. This is basically
-the mechanism that uses logback to provide easy access to the right
-<code>LoggerContext</code> instance.
-</p>
-
-<p>
-The component that manages the different contexts is a
-<a href="../xref/ch/qos/logback/classic/selector/ContextSelector.html">
-ContextSelector</a>
-implementation. The JNDI-specific implementation is called
-<a href="../xref/ch/qos/logback/classic/selector/ContextJNDISelector.html">
-ContextJNDISelector</a>.
-</p>
-
-<p>
-Each Web application provides two environment variables. One that specifies
-the application's <code>LoggerContext</code> name, and one that provides the
-path to the xml file that will be used to configure the context.
-</p>
+ <script src="../templates/creative.js"></script>
+ <h3>Introduction</h3>
-<h3>The server side</h3>
-
-<h4>Configuring Tomcat</h4>
-
-<p>
-First, place the logback jars (that is logback-classic-<em>VERSION</em>.jar,
-logback-core-<em>VERSION</em>.jar and slf4j-api-<em>VERSION</em>.jar) in the
-server's shared class directory. In Tomcat, this directory is
-<em>TOMCAT_HOME/common/lib/</em>.
-</p>
-
-<p>
-The next step is to let logback know that it will have to use JNDI to manage
-the context instances. This is done thanks to a System Property. When launching
-Tomcat, make sure that the <em>logback.ContextSelector</em> property is
-set with the <em>JNDI</em> value. This can be done by editing the
-<em>TOMCAT_HOME/bin/catalina.sh</em> or <em>TOMCAT_HOME/bin/catalina.bat</em>
-file, and adding the following line to the java options:
-</p>
-
-<div class="source"><pre>-Dlogback.ContextSelector=JNDI</pre></div>
-
-<h4>Configuring Jetty</h4>
-
-<p>
-Configuring Jetty requires first to enable the use of JNDI. This is not a big
-deal, since the Jetty distribution provides the configuration files needed to
-achieve this task. The only thing to do is launch Jetty with the following command:
-</p>
-
-<div class="source"><pre>java -jar start.jar etc/jetty.xml etc/jetty-plus.xml</pre></div>
-
-<p>
-Note that you will need to install your appplications in the
-<em>JETTY_HOME/webapps-plus</em> directory.
-</p>
-
-<p>In Jetty, the server shared class directory is <em>JETTY_HOME/lib/</em>.
-This is where you will need to place the logback jars
-(that is logback-classic-<em>VERSION</em>.jar,
-logback-core-<em>VERSION</em>.jar and slf4j-api-<em>VERSION</em>.jar).
-</p>
-
-<p>
-The next step is to let logback know that it will have to use JNDI to manage
-the context instances. This is done thanks to a System Property.
-In Jetty, adding an environment variable is done by adding the following
-xml element in the <em>JETTY_HOME/etc/jetty.xml</em> configuration file,
-nested in a <em>Configuration</em> element:
-</p>
+ <p>
+ When working with several Web applications, all running on one
+ server, the multiplications of <code>LoggerContext</code> objects
+ might reveal itself a tricky issue.
+ </p>
+
+ <p>Logback provides a simple yet powerful way of dealing with
+ multiple contexts, without corruption of data, nor collusion
+ between context instances.
+ </p>
+
+ <p>One thing we know is that JNDI environments are
+ independant. Thus setting environment variables in each
+ application will allow a given component to know which application
+ it is dealing with at the moment. This is basically the mechanism
+ that uses logback to provide easy access to the right
+ <code>LoggerContext</code> instance.
+ </p>
+
+ <p>The component that manages the different contexts is a <a
+ href="../xref/ch/qos/logback/classic/selector/ContextSelector.html">
+ ContextSelector</a> implementation. The JNDI-specific
+ implementation is called <a
+ href="../xref/ch/qos/logback/classic/selector/ContextJNDISelector.html">
+ ContextJNDISelector</a>.
+ </p>
+
+ <p>Each Web application provides two environment variables. One
+ that specifies the application's <code>LoggerContext</code> name,
+ and one that provides the path to the xml file that will be used
+ to configure the context.
+ </p>
+
+
+ <h3>The server side</h3>
+
+ <h4>Configuring Tomcat</h4>
+
+ <p>First, place the logback jars (that is
+ logback-classic-<em>VERSION</em>.jar,
+ logback-core-<em>VERSION</em>.jar and slf4j-api-<em>VERSION</em>.jar)
+ in the server's shared class directory. In Tomcat, this directory is
+ <em>TOMCAT_HOME/common/lib/</em>.
+ </p>
+
+ <p>The next step is to let logback know that it will have to use
+ JNDI to manage the context instances. This is done thanks to a
+ System Property. When launching Tomcat, make sure that the
+ <em>logback.ContextSelector</em> property is set with the
+ <em>JNDI</em> value. This can be done by editing the
+ <em>TOMCAT_HOME/bin/catalina.sh</em> or
+ <em>TOMCAT_HOME/bin/catalina.bat</em> file, and adding the
+ following line to the java options:
+ </p>
+
+ <div class="source"><pre>-Dlogback.ContextSelector=JNDI</pre></div>
+
+ <h4>Configuring Jetty</h4>
+
+ <p>Configuring Jetty requires first to enable the use of
+ JNDI. This is not a big deal, since the Jetty distribution
+ provides the configuration files needed to achieve this task. The
+ only thing to do is launch Jetty with the following command:
+ </p>
+
+ <div class="source"><pre>java -jar start.jar etc/jetty.xml etc/jetty-plus.xml</pre></div>
+
+ <p>Note that you will need to install your appplications in the
+ <em>JETTY_HOME/webapps-plus</em> directory.
+ </p>
+
+ <p>In Jetty, the server shared class directory is
+ <em>JETTY_HOME/lib/</em>. This is where you will need to place
+ the logback jars (that is logback-classic-<em>VERSION</em>.jar,
+ logback-core-<em>VERSION</em>.jar and
+ slf4j-api-<em>VERSION</em>.jar).
+ </p>
+
+ <p>The next step is to let logback know that it will have to use
+ JNDI to manage the context instances. This is done thanks to a
+ System Property. In Jetty, adding an environment variable is done
+ by adding the following xml element in the
+ <em>JETTY_HOME/etc/jetty.xml</em> configuration file, nested in a
+ <em>Configuration</em> element:
+ </p>
<div class="source"><pre><Call class="java.lang.System" name="setProperty">
<Arg>logback.ContextSelector</Arg>
<Arg>JNDI</Arg>
</Call></pre></div>
-<p>
-Be aware that adding a <em>-Dlogback.ContextSelector=JNDI</em> to the java
-command when starting the server will not work. By doing this, the
-<code>LoggerFactory</code> instanciated by the server for its internal logging
-will try to use JNDI, when only the Web applications should attempt to retrieve
-their <code>LoggerContext</code> this way.
-</p>
-
-<h3>Configuring each Web application</h3>
-
-<p>
-While each Web application will need the logback jars to compile, they need not
-nor should be placed within the Web application's WAR file, except if you are
-using Jetty.
-</p>
-
-<p>This is due to <a href="http://docs.codehaus.org/display/JETTY/Classloading">
-Jetty's internal Classloading mechanism</a>.
-Consequently, the <em>logback-classic-VERSION.jar</em>
-and <em>slf4j-api-VERSION.jar</em> files should also be placed in the <em>WEB-INF/lib/</em>
-directory of your webapps when running Jetty.
-</p>
-
-<p>
-In each Web application's <em>web.xml</em> file, two JNDI environment entries
-are needed. The first one specifies the desired name of the application's
-<code>LoggerContext</code>. It takes the following form:
-</p>
+ <p>Be aware that adding a <em>-Dlogback.ContextSelector=JNDI</em>
+ to the java command when starting the server will not work. By
+ doing this, the <code>LoggerFactory</code> instanciated by the
+ server for its internal logging will try to use JNDI, when only the
+ Web applications should attempt to retrieve their
+ <code>LoggerContext</code> this way.
+ </p>
+
+ <h3>Configuring each Web application</h3>
+
+ <p>While each Web application will need the logback jars to
+ compile, they need not nor should be placed within the Web
+ application's WAR file, except if you are using Jetty.
+ </p>
+
+ <p>This is due to <a
+ href="http://docs.codehaus.org/display/JETTY/Classloading"> Jetty's
+ internal Classloading mechanism</a>. Consequently, the
+ <em>logback-classic-VERSION.jar</em> and
+ <em>slf4j-api-VERSION.jar</em> files should also be placed in the
+ <em>WEB-INF/lib/</em> directory of your webapps when running Jetty.
+ </p>
+
+ <p>In each Web application's <em>web.xml</em> file, two JNDI
+ environment entries are needed. The first one specifies the desired
+ name of the application's <code>LoggerContext</code>. It takes the
+ following form:
+ </p>
<div class="source"><pre><env-entry>
<description>JNDI logging context for this app</description>
@@ -181,10 +151,9 @@
<env-entry-value>ContextApp-A</env-entry-value>
</env-entry></pre></div>
-<p>
-The second JNDI entry will lead logback to the application's own xml configuration
-file. It can be declared as shown below:
-</p>
+ <p>The second JNDI entry will lead logback to the application's own
+ xml configuration file. It can be declared as shown below:
+ </p>
<div class="source"><pre><env-entry>
<description>URL for configuring logback context</description>
@@ -193,17 +162,17 @@
<env-entry-value>logback-app-A.xml</env-entry-value>
</env-entry></pre></div>
-<p>
-Specifying only the name of the file will lead logback to search for it in
-the Web application's <em>WEB-INF/classes/</em> directory.
-</p>
-
-<p>
-When the Web application is recycled or shutdown, it is very often
-useful to recycle the associated <code>LoggerContext</code>. This can
-be done by installing a <code>ServletContextListener</code> which will
-detach the context from the <code>ContextSelector</code> and shut it down.
-</p>
+ <p>Specifying only the name of the file will lead logback to search
+ for it in the Web application's <em>WEB-INF/classes/</em>
+ directory.</p>
+
+ <p>
+ When the Web application is recycled or shutdown, it is very often
+ useful to recycle the associated <code>LoggerContext</code>. This
+ can be done by installing a <code>ServletContextListener</code>
+ which will detach the context from the <code>ContextSelector</code>
+ and shut it down.
+ </p>
<p>
The <a href="../xref/ch/qos/logback/classic/selector/servlet/ContextDetachingSCL.html">
@@ -217,33 +186,33 @@
</listener</pre></div>
-<p>
-Using the <code>ContextJNDISelector</code> might slow down your
-application, because of the JNDI call that is issued each time
-a <code>LoggerContext</code> is required. To prevent the cost
-of this call, logback ships with a <code>LoggerContextFilter</code>
-component. This filter is a <code>javax.servlet.Filter</code> implementation
-that gets the environment-specific <code>LoggerContext</code> and sets it
-in a <code>ThreadLocal</code> variable. Each time
-the <code>ContextSelector</code> will be called to provide the
-Web application's own <code>LoggerContext</code>, it will first check
-if the <code>ThreadLocal</code> variable is set. If it is, then the call
-to the JNDI environment will not be issued. The <code>LoggerContextFilter</code>
-class increases the performances by a wide margin.
-</p>
-
-<p>
-Like all servlet filters, the
-<a href="../xref/ch/qos/logback/classic/selector/servlet/LoggerContextFilter.html">
-<code>LoggerContextFilter</code></a> can act
-before and after the Web application's process. This allows the filter
-to set the <code>ThreadLocal</code> variable at the beginning of the process
-and to remove it once the Web application has finished processing the request.
-This behaviour permits the thread to be recycled for use by another Web
-application and still provide the correct <code>LoggerContext</code>.
-</p>
+ <p>Using the <code>ContextJNDISelector</code> might slow down your
+ application, because of the JNDI call that is issued each time a
+ <code>LoggerContext</code> is required. To prevent the cost of this
+ call, logback ships with a <code>LoggerContextFilter</code>
+ component. This filter is a <code>javax.servlet.Filter</code>
+ implementation that gets the environment-specific
+ <code>LoggerContext</code> and sets it in a <code>ThreadLocal</code>
+ variable. Each time the <code>ContextSelector</code> will be called
+ to provide the Web application's own <code>LoggerContext</code>, it
+ will first check if the <code>ThreadLocal</code> variable is set. If
+ it is, then the call to the JNDI environment will not be issued. The
+ <code>LoggerContextFilter</code> class increases the performances by
+ a wide margin.
+ </p>
+
+ <p>Like all servlet filters, the <a
+ href="../xref/ch/qos/logback/classic/selector/servlet/LoggerContextFilter.html">
+ <code>LoggerContextFilter</code></a> can act before and after the
+ Web application's process. This allows the filter to set the
+ <code>ThreadLocal</code> variable at the beginning of the process
+ and to remove it once the Web application has finished processing
+ the request. This behaviour permits the thread to be recycled for
+ use by another Web application and still provide the correct
+ <code>LoggerContext</code>.
+ </p>
-<p>The <code>LoggerContextFilter</code> can be used by adding the following
+ <p>The <code>LoggerContextFilter</code> can be used by adding the following
lines to your Web application's <em>web.xml</em> file.
</p>
@@ -265,25 +234,25 @@
<div class="source"><pre><display-name>Name_Of_My_WebApp</display-name></pre></div>
-<p>
-We recommend that you name logback configuration resources uniquely. In
-particualar, avoid naming the logback configuration resource as
-<em>logback.xml</em> for a non-default logger context.
+ <p>We recommend that you name logback configuration resources
+ uniquely. In particualar, avoid naming the logback configuration
+ resource as <em>logback.xml</em> for a non-default logger context.
+ </p>
+
+ <p>While trying to configure the Web application logback would
+ search for the resource <em>logback.xml</em> using the thread
+ context classloader. Thus, it would first attempt to locate
+ <em>logback.xml</em> file using the classloader specific to the Web
+ application. However, if the file <em>logback.xml</em> did not
+ exist there (if you forgot to put a custom one in
+ <em>WEB-INF/classes</em>), and if the file <em>logback.xml</em>
+ existed higher up in the classloader tree, we could end up in a
+ situation where the logger context for your Web application would be
+ configured using the same file as that used to configure the default
+ context. Such involuntary sharing of the same configuration by
+ multiple repositories will result in corrupt log output.
</p>
-<p>
-While trying to configure the Web application logback would search for
-the resource <em>logback.xml</em> using the thread context classloader. Thus,
-it would first attempt to locate <em>logback.xml</em> file using the
-classloader specific to the Web application. However, if the file
-<em>logback.xml</em> did not exist there (if you forgot to put a custom one in
-<em>WEB-INF/classes</em>), and if the file <em>logback.xml</em> existed higher up in the
-classloader tree, we could end up in a situation where the logger
-context for your Web application would be configured using the same
-file as that used to configure the default context. Such
-involuntary sharing of the same configuration by multiple repositories
-will result in corrupt log output.
-</p>
<script src="../templates/footer.js"></script>
</div>
</body>
Modified: logback/trunk/logback-site/src/site/pages/manual/filters.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/filters.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/filters.html Fri Mar 2 22:17:10 2007
@@ -14,51 +14,24 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
- <h2>Chapter 6: Filter chains</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
+ <h1>Chapter 6: Filter chains</h1>
+
+ <script src="../templates/creative.js"></script>
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>.
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
- <p>
- As we have seen, logback has several built-in ways for filtering log requests,
- including the context-wide filter, logger-level selection rule and appender filters.
- These provide high performance filtering for the most commonly encountered
- cases. These filters are largely inspired from Linux ipchains or
- iptables as they are called in more recent Linux kernels.
- Logback filters are based on ternary logic allowing them to be assembled or chained
- together to compose an arbitrarily complex filtering policy.
+ <p>As we have seen, logback has several built-in ways for
+ filtering log requests, including the context-wide filter,
+ logger-level selection rule and appender filters. These provide
+ high performance filtering for the most commonly encountered
+ cases. These filters are largely inspired from Linux ipchains or
+ iptables as they are called in more recent Linux kernels.
+ Logback filters are based on ternary logic allowing them to be
+ assembled or chained together to compose an arbitrarily complex
+ filtering policy.
</p>
<div class="highlight">
Added: logback/trunk/logback-site/src/site/pages/manual/index_menu.js
==============================================================================
--- (empty file)
+++ logback/trunk/logback-site/src/site/pages/manual/index_menu.js Fri Mar 2 22:17:10 2007
@@ -0,0 +1,11 @@
+
+document.write('<p class="menu_header">Manual</p>')
+document.write('<p class="menu"><a href="introduction.html"><b>Ch1: Introduction to logback</b></a></p>');
+document.write('<p class="menu"><a href="architecture.html"><b>Ch2: Architecture</b></a>');
+document.write('<p class="menu"><a href="joran.html"><b>Ch3: Logback configuration with Joran</b></a>');
+document.write('<p class="menu"><a href="appenders.html"><b>Ch4: Appenders</b></a>');
+document.write('<p class="menu"><a href="layouts.html"><b>Ch5: Layouts</b></a>');
+document.write('<p class="menu"><a href="filters.html"><b>Ch6: Filter chains</b></a>');
+document.write('<p class="menu"><a href="mdc.html"><b>Ch7: Diagnostic Contexts</b></a>');
+document.write('<p class="menu"><a href="contextSelector.html"><b>Ch8: Context Selectors</b></a>');
+
Modified: logback/trunk/logback-site/src/site/pages/manual/introduction.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/introduction.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/introduction.html Fri Mar 2 22:17:10 2007
@@ -14,7 +14,7 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
Modified: logback/trunk/logback-site/src/site/pages/manual/joran.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/joran.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/joran.html Fri Mar 2 22:17:10 2007
@@ -14,43 +14,13 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
- <h2>Chapter 3: Logback configuration with Joran</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
-
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>
- .
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
+ <h1>Chapter 3: Logback configuration with Joran</h1>
+
+ <script src="../templates/creative.js"></script>
<div class="highlight">
<p>
Modified: logback/trunk/logback-site/src/site/pages/manual/layouts.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/layouts.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/layouts.html Fri Mar 2 22:17:10 2007
@@ -16,7 +16,7 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
Modified: logback/trunk/logback-site/src/site/pages/manual/mdc.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/mdc.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/mdc.html Fri Mar 2 22:17:10 2007
@@ -14,52 +14,26 @@
<script src="../templates/left.js"></script>
</div>
<div id="right">
- <script src="../templates/right.js"></script>
+ <script src="index_menu.js"></script>
</div>
<div id="content">
- <h2>Chapter 7: Diagnostic Context</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
-
- <table>
- <tr>
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>.
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
-
- <p>
- One of the design goals of logback is to audit and debug complex distributed applications.
- Most real-world distributed systems need to deal with multiple clients simultaneously.
- In a typical multithreaded implementation of such a system, different threads will handle
- different clients. A possible but discouraged approach to differentiate the logging output of
- one client from another consists of instantiating a new and separate logger for each client.
- This technique promotes the proliferation of loggers and considerably increases
- their management overhead.
+
+ <h1>Chapter 7: Diagnostic Contexts</h1>
+
+ <script src="../templates/creative.js"></script>
+
+ <p>One of the design goals of logback is to audit and debug
+ complex distributed applications. Most real-world distributed
+ systems need to deal with multiple clients simultaneously. In a
+ typical multithreaded implementation of such a system, different
+ threads will handle different clients. A possible but discouraged
+ approach to differentiate the logging output of one client from
+ another consists of instantiating a new and separate logger for
+ each client. This technique promotes the proliferation of loggers
+ and considerably increases their management overhead.
</p>
- <div class="highlight">
+
+ <div class="highlight">
<p>
In order to run the examples in this chapter, you need
to make sure that certain jar files are present on the
1
0

svn commit: r1384 - in logback/trunk/logback-site/src/site/pages: css manual templates
by noreply.ceki@qos.ch 02 Mar '07
by noreply.ceki@qos.ch 02 Mar '07
02 Mar '07
Author: ceki
Date: Fri Mar 2 21:55:39 2007
New Revision: 1384
Modified:
logback/trunk/logback-site/src/site/pages/css/site.css
logback/trunk/logback-site/src/site/pages/manual/introduction.html
logback/trunk/logback-site/src/site/pages/manual/layouts.html
logback/trunk/logback-site/src/site/pages/templates/right.js
Log:
ongoing work
Modified: logback/trunk/logback-site/src/site/pages/css/site.css
==============================================================================
--- logback/trunk/logback-site/src/site/pages/css/site.css (original)
+++ logback/trunk/logback-site/src/site/pages/css/site.css Fri Mar 2 21:55:39 2007
@@ -248,6 +248,12 @@
.green {
color: green;
}
+
+.white_bg {
+ background-color: #FFFFFF;
+}
+
+
.blue {
color: blue;
}
Modified: logback/trunk/logback-site/src/site/pages/manual/introduction.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/introduction.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/introduction.html Fri Mar 2 21:55:39 2007
@@ -17,43 +17,12 @@
<script src="../templates/right.js"></script>
</div>
<div id="content">
- <h2>Introduction</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
-
- <table class="bodyTable">
- <tr class="a">
- <td valign="top" align="top">
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This work is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>
- .
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
+ <h1>Introduction</h1>
+ <script src="../templates/creative.js"></script>
- <h2>Introduction</h2>
+ <h2>What is logback?</h2>
<p>
Logback is intended as a successor to the popular log4j project.
Modified: logback/trunk/logback-site/src/site/pages/manual/layouts.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/layouts.html (original)
+++ logback/trunk/logback-site/src/site/pages/manual/layouts.html Fri Mar 2 21:55:39 2007
@@ -20,41 +20,9 @@
</div>
<div id="content">
- <h2>Chapter 5: Layouts</h2>
- <div class="author">
- Authors: Ceki Gülcü, Sébastien Pennec
- </div>
-
-
- <table cellpadding="10">
-
- <tr>
- <td>
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- <img alt="Creative Commons License"
- style="border-width: 0"
- src="http://creativecommons.org/images/public/somerights20.png" />
- </a>
- </td>
- <td>
- <p>Copyright © 2000-2006, QOS.ch</p>
-
- <p>
- <!--Creative Commons License-->
- This document is licensed under a
- <a rel="license"
- href="http://creativecommons.org/licenses/by-nc-sa/2.5/">
- Creative Commons
- Attribution-NonCommercial-ShareAlike 2.5
- License
- </a>
-
- <!--/Creative Commons License-->
- </p>
- </td>
- </tr>
- </table>
+ <h1>Chapter 5: Layouts</h1>
+
+ <script src="../templates/creative.js"></script>
<div class="highlight">
@@ -65,7 +33,7 @@
</p>
</div>
- <h2>What is a layout</h2>
+ <h2>What is a layout?</h2>
<p>While appenders are responsible for writing logging output to
an appender dependent device, layouts are responsible for the
@@ -281,16 +249,16 @@
<!-- ====================== XXXXXXXXXXXXx -->
+
<p>The addition of the corresponding setter method is all that is
needed to enable the configuration of an option. Note that the
- <code>PrintThreadName</code> attribute is a boolean and not a
- <code>String</code>. It can be configured anyway by writing
- <em>true</em> of <em>false</em> in the configuration
- file.Configuration of logback components was covered in detail in
- <a href="chapter3.html">"Chapter 3: Logback configuration with
- Joran"</a>. Here is a configuration file adapted for
- <code>MySampleLayout2</code>.
- </p>
+ <code>PrintThreadName</code> option is boolean and not
+ <code>String</code>. Configuration of logback components was
+ covered in detail in <a href="joran.html">"Chapter 3: Logback
+ configuration with Joran"</a>. Here is the configuration file
+ tailor-made for use with <code>MySampleLayout2</code>.
+ </p>
+
<div class="source"><pre><configuration>
@@ -317,13 +285,13 @@
<h3>PatternLayout</h3>
<p>
- Logback classic ships with a flexible layout called
- <a href="../xref/ch/qos/logback/classic/PatternLayout.html">
- <code>PatternLayout</code></a>.
- As all classic layouts, <code>PatternLayout</code>
- takes a logging event and returns a String. However, the
- returned String can be customized at will by tweaking its
- conversion pattern.
+ Logback classic ships with a flexible layout called <a
+ href="../xref/ch/qos/logback/classic/PatternLayout.html">
+ <code>PatternLayout</code></a>. As all layouts,
+ <code>PatternLayout</code> takes a logging event and returns a
+ <code>String</code>. However, this <code>String</code> can be
+ customized at will by tweaking the conversion pattern of
+ <code>PatternLayout</code>.
</p>
<p>
The conversion pattern of
@@ -360,9 +328,9 @@
static public void main(String[] args) throws Exception {
Logger rootLogger = (Logger)LoggerFactory.getLogger("root");
- <b>PatternLayout layout = new PatternLayout();
- layout.setPattern("%-5level [%thread]: %message%n");
- layout.start();</b>
+ <b>PatternLayout layout = new PatternLayout();</b>
+ <b>layout.setPattern("%-5level [%thread]: %message%n");</b>
+ <b>layout.start();</b>
ConsoleAppender<LoggingEvent> appender = new ConsoleAppender<LoggingEvent>();
appender.setContext(rootLogger.getLoggerContext());
@@ -395,29 +363,34 @@
justified to a width of five characters. Format specifiers
will be explained in a short moment.
</p>
- <p>
- Note that usual brackets chars <em>(</em>
- and <em>)</em> need to be escaped to be parsed correctly. These
- brackets can be used by adding two backslashes before the bracket
- like in <em>\\)</em> and <em>\\)</em>.
+
+ <p>In PatternLayout, parenthesis can be used to group conversion
+ patterns. It follows that the '(' and ')' carry special meaning
+ and need to be escaped to be used as literals. Parentheses can
+ be escaped by preceding the the opening and closing parenthesis
+ by backslash, but since backslash itself carries special meaning
+ in Java, we need two backslahes, as in "\\(" and "\\)". In
+ practice however, only the opening parenthesis needs to be
+ escaped to be used as a literal.
</p>
- <p>
- As mentionned previously, certain conversion specifiers can include
- optional parameters which are declared
- between braces following the conversion word. A sample conversion
- specifier with options could be <em>%logger{10}</em>.
+
+ <p>As mentionned previously, certain conversion specifiers can
+ include optional parameters which are passed between braces
+ following the conversion word. A sample conversion specifier with
+ options could be <code>%logger{10}</code>. Here "logger" is the
+ conversion word, and 10 is the option.
</p>
<p>The recognized conversions words along with their options are
- described below. When multiple conversion words are listed on the left
- column, they should be considered as aliases.
+ described in the table below. When multiple conversion words are
+ listed on the left column, they should be considered as aliases.
</p>
- <table border="1" CELLPADDING="8">
+ <table class="bodyTable" border="0" CELLPADDING="8">
<th>Conversion Word</th>
<th>Effect</th>
- <tr>
+ <tr class="b">
<td align="center">
<b>c</b>{<em>length</em>} <br />
<b>l</b>{<em>length</em>} <br />
@@ -427,48 +400,48 @@
<td>
<p>
- Used to output the name of the logger at the
- source of the logging event.
- </p>
- <p>
- The logger name conversion word can take an
- integer as a first option. The
- converter's abbreviation algorithm will shorten the logger name
- without significant loss of meaning.
+ Used to output the name of the logger at the origin of the
+ logging event.
</p>
- <p>The next table should clarify the matter.</p>
+ <p>
+ This conversion word can take an integer as first and only
+ option. The converter's abbreviation algorithm will
+ shorten the logger name, usually without significant loss
+ of meaning. The next table provides examples of the
+ abbreviation algorithm in action.
+ </p>
- <table BORDER="1" CELLPADDING="8">
- <tr>
- <th>Conversion Pattern</th>
+ <table class="bodyTable" border="0" cellpadding="8">
+ <tr class="a">
+ <th>Conversion specifier</th>
<th>Logger name</th>
<th>Result</th>
</tr>
- <tr>
+ <tr class="a">
<td>%logger</td>
<td>mainPackage.sub.sample.Bar</td>
<td>mainPackage.sub.sample.Bar</td>
</tr>
- <tr>
+ <tr class="a">
<td>%logger{10}</td>
<td>mainPackage.sub.sample.Bar</td>
<td>m.s.s.Bar</td>
</tr>
- <tr>
+ <tr class="a">
<td>%logger{15}</td>
<td>mainPackage.sub.sample.Bar</td>
<td>m.s.sample.Bar</td>
</tr>
- <tr>
+ <tr class="a">
<td>%logger{16}</td>
<td>mainPackage.sub.sample.Bar</td>
<td>m.sub.sample.Bar</td>
</tr>
- <tr>
+ <tr class="a">
<td>%logger{26}</td>
<td>mainPackage.sub.sample.Bar</td>
<td>mainPackage.sub.sample.Bar</td>
@@ -476,7 +449,7 @@
</table>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>C</b>{<em>length</em>} <br />
<b>class</b>{<em>length</em>} <br />
@@ -489,12 +462,9 @@
</p>
<p>
Just like the <em>%logger</em> conversion word above, this
- word can take an interger as it's first option
- and use its abbreviation algorithm to
- shorten the class name.
- </p>
- <p>
- By default the class name is output in full.
+ word can take an interger as it's first option and use its
+ abbreviation algorithm to shorten the class name. By
+ default the class name is output in full.
</p>
<p>
Generating the caller class information is not particularly fast.
@@ -504,42 +474,46 @@
</td>
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>d</b>{<em>pattern</em>} <br />
<b>date</b>{<em>pattern</em>} <br />
</td>
<td>
- <p>Used to output the date of the logging event.
- The date conversion word may be followed by an option
- enclosed between braces.</p>
+ <p>Used to output the date of the logging event. The date
+ conversion word may be followed by an option enclosed
+ between braces.</p>
+
<p>The option admits the same syntax as the time pattern
string of the <code>java.text.SimpleDateFormat</code>.</p>
+
<p>A shortcut to the ISO8601 format is available by
- specifying the String <em>"ISO8601"</em> in the braces. If no option is set,
- the converter uses <em>"ISO8601"</em> as the default value.</p>
- <p>Here are some sample option values. They assume
- that the actual date is Friday 20th of October, 2006 and that
- the author finished his meal a short while ago.</p>
+ specifying the String <em>"ISO8601"</em> in the braces. If
+ no option is set, the converter uses <em>"ISO8601"</em> as
+ the default value.</p>
+
+ <p>Here are some sample option values. They assume that the
+ actual date is Friday 20th of October, 2006 and that the
+ author finished his meal a short while ago.</p>
- <table BORDER="1" CELLPADDING="8">
- <tr>
+ <table class="bodyTable" CELLPADDING="8">
+ <tr class="a">
<th>Conversion Pattern</th>
<th>Result</th>
</tr>
- <tr>
+ <tr class="a">
<td>%date</td>
<td>2006-10-20 14:46:49,812</td>
</tr>
- <tr>
+ <tr class="a">
<td>%date{ISO8601}</td>
<td>2006-10-20 14:46:49,812</td>
</tr>
- <tr>
+ <tr class="a">
<td>%date{HH:mm:ss.SSS}</td>
<td>14:46:49.812</td>
</tr>
- <tr>
+ <tr class="a">
<td>%date{dd MMM yyyy ;HH:mm:ss.SSS}</td>
<td>20 oct. 2006;14:46:49.812 </td>
</tr>
@@ -547,25 +521,24 @@
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>F / file</b>
</td>
<td>
- <p>
- Used to output the file name where the logging
- request was issued.
+ <p> Used to output the file name of the Java source file
+ where the logging request was issued.
</p>
- <p>
- Generating the file information is not particularly fast.
- Thus, it's use should be avoided unless
- execution speed is not an issue.
+
+ <p>Generating the file information is not particularly fast.
+ Thus, it's use should be avoided unless execution speed is
+ not an issue.
</p>
</td>
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>caller{depth}</b>
<b>caller{depth, evaluator-1, ... evaluator-n}</b>
@@ -591,29 +564,31 @@
</p>
<p>For example, <b>%caller{2}</b> would display the following excerpt:</p>
-<div class="source"><pre>0 [main] DEBUG - logging statement
+<div class="source white_bg"><pre>0 [main] DEBUG - logging statement
Caller+0 at mainPackage.sub.sample.Bar.sampleMethodName(Bar.java:22)
Caller+1 at mainPackage.sub.sample.Bar.createLoggingRequest(Bar.java:17)</pre></div>
<p>And <b>%caller{3}</b> would display this other excerpt:</p>
-<div class="source"><pre>16 [main] DEBUG - logging statement
+<div class="source white_bg">16 [main] DEBUG - logging statement
Caller+0 at mainPackage.sub.sample.Bar.sampleMethodName(Bar.java:22)
Caller+1 at mainPackage.sub.sample.Bar.createLoggingRequest(Bar.java:17)
-Caller+2 at mainPackage.ConfigTester.main(ConfigTester.java:38)</pre></div>
+Caller+2 at mainPackage.ConfigTester.main(ConfigTester.java:38)</div>
- <p>
- This conversion word can also use evaluators to test logging events
- against a given criteria before creating the output. For example,
- using <b>%caller{3, CALLER_DISPLAY_EVAL}</b> will display three lines
- of stacktrace, only if the evaluator called <em>CALLER_DISPLAY_EVAL</em>
- returns a <b>positive</b> answer.
+ <p>This conversion word can also use evaluators to test
+ logging events against a given criteria before creating the
+ output. For example, using <b>%caller{3,
+ CALLER_DISPLAY_EVAL}</b> will display three lines of
+ stacktrace, only if the evaluator called
+ <em>CALLER_DISPLAY_EVAL</em> returns a <b>positive</b>
+ answer.
</p>
+
<p>Evaluators are described
further down this document.
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>L / line</b>
</td>
@@ -632,7 +607,7 @@
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>m / msg / message</b>
</td>
@@ -642,7 +617,7 @@
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>M / method</b>
</td>
@@ -660,7 +635,7 @@
</td>
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>n</b>
</td>
@@ -681,14 +656,14 @@
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>p / le / level</b>
</td>
<td>Used to output the level of the logging event.</td>
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>r / relative</b>
@@ -702,7 +677,7 @@
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>t / thread</b>
</td>
@@ -714,7 +689,7 @@
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>X</b>{<em>key</em>} <br />
<b>mdc</b>{<em>key</em>} <br />
@@ -752,7 +727,7 @@
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>ex</b>{<em>length</em>} <br />
<b>throwable</b>{<em>length</em>} <br />
@@ -778,30 +753,30 @@
<p>Here are some examples:</p>
<table BORDER="1" CELLPADDING="8">
- <tr>
+ <tr class="a">
<th>Conversion Pattern</th>
<th>Result</th>
</tr>
- <tr>
+ <tr class="a">
<td>%ex</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)
at mainPackage.foo.bar.TestThrower.readyToLaunch(TestThrower.java:17)
at mainPackage.ExceptionLauncher.main(ExceptionLauncher.java:38)</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td>%ex{short}</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td>%ex{full}</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)
at mainPackage.foo.bar.TestThrower.readyToLaunch(TestThrower.java:17)
at mainPackage.ExceptionLauncher.main(ExceptionLauncher.java:38)</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td>%ex{2}</td>
<td><pre>mainPackage.foo.bar.TestException: Houston we have a problem
at mainPackage.foo.bar.TestThrower.fire(TestThrower.java:22)
@@ -820,7 +795,7 @@
</td>
</tr>
- <tr>
+ <tr class="b">
<td align="center">
<b>marker</b>
</td>
@@ -839,7 +814,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">
<b>%</b>
@@ -907,7 +882,7 @@
<th>Maximum width</th>
<th>Comment</th>
- <tr>
+ <tr class="a">
<td align="center">%20logger</td>
<td align="center">false</td>
<td align="center">20</td>
@@ -917,7 +892,7 @@
than 20 characters long.
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">%-20logger</td>
<td align="center">true</td>
<td align="center">20</td>
@@ -927,7 +902,7 @@
than 20 characters long.
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">%.30logger</td>
<td align="center">NA</td>
<td align="center">none</td>
@@ -937,7 +912,7 @@
longer than 30 characters.
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">%20.30logger</td>
<td align="center">false</td>
<td align="center">20</td>
@@ -949,7 +924,7 @@
beginning.
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">%-20.30logger</td>
<td align="center">true</td>
<td align="center">20</td>
@@ -961,7 +936,7 @@
<em>beginning</em>.
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">%.-30logger</td>
<td align="center">NA</td>
<td align="center">none</td>
@@ -980,22 +955,22 @@
<th>Format modifier</th>
<th>Logger name</th>
<th>Result</th>
- <tr>
+ <tr class="a">
<td align="center">[%-20.20logger]</td>
<td align="center">main.Name</td>
<td align="center"><pre>[main.Name ]</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">[%20.-20logger]</td>
<td align="center">main.Name</td>
<td align="center"><pre>[ main.Name]</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">[%-10.10logger]</td>
<td align="center">main.foo.foo.bar.Name</td>
<td align="center"><pre>[o.bar.Name]</pre></td>
</tr>
- <tr>
+ <tr class="a">
<td align="center">[%10.-10logger]</td>
<td align="center">main.foo.foo.bar.Name</td>
<td align="center"><pre>[main.foo.f]</pre></td>
@@ -1480,7 +1455,7 @@
<th align="center">Conversion Word</th>
<th align="center">Effect</th>
- <tr>
+ <tr class="a">
<td align="center"><b>a / remoteIP</b></td>
<td>
<p>
@@ -1488,7 +1463,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>A / localIP</b></td>
<td>
<p>
@@ -1496,7 +1471,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>b / B / byteSent</b></td>
<td>
<p>
@@ -1504,7 +1479,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>h / clientHost</b></td>
<td>
<p>
@@ -1512,7 +1487,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>H / protocol</b></td>
<td>
<p>
@@ -1520,7 +1495,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>l</b></td>
<td>
<p>
@@ -1530,7 +1505,7 @@
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>reqParameter{paramName}</b></td>
<td>
<p>
@@ -1542,7 +1517,7 @@
displays the corresponding parameter.</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>i{header} / header{header}</b></td>
<td>
<p>
@@ -1556,7 +1531,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>m / requestMethod</b></td>
<td>
<p>
@@ -1564,7 +1539,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>r / requestURL</b></td>
<td>
<p>
@@ -1572,7 +1547,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>s / statusCode</b></td>
<td>
<p>
@@ -1580,7 +1555,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>t / date</b></td>
<td>
<p>
@@ -1611,7 +1586,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>u / user</b></td>
<td>
<p>
@@ -1619,7 +1594,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>U / requestURI</b></td>
<td>
<p>
@@ -1627,7 +1602,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>v / server</b></td>
<td>
<p>
@@ -1635,7 +1610,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>localPort</b></td>
<td>
<p>
@@ -1643,7 +1618,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>reqAttribute{attributeName}</b></td>
<td>
<p>
@@ -1655,7 +1630,7 @@
displays the corresponding attribute.</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>reqCookie{cookie}</b></td>
<td>
<p>
@@ -1666,7 +1641,7 @@
<p><b>%cookie{COOKIE_NAME}</b> displays corresponding cookie.</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>responseHeader{header}</b></td>
<td>
<p>
@@ -1677,7 +1652,7 @@
<p><b>%header{Referer}</b> displays the referer of the response.</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>requestContent</b></td>
<td>
<p>
@@ -1693,7 +1668,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>fullRequest</b></td>
<td>
<p>
@@ -1702,7 +1677,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>responseContent</b></td>
<td>
<p>
@@ -1718,7 +1693,7 @@
</p>
</td>
</tr>
- <tr>
+ <tr class="a">
<td align="center"><b>fullResponse</b></td>
<td>
<p>
Modified: logback/trunk/logback-site/src/site/pages/templates/right.js
==============================================================================
--- logback/trunk/logback-site/src/site/pages/templates/right.js (original)
+++ logback/trunk/logback-site/src/site/pages/templates/right.js Fri Mar 2 21:55:39 2007
@@ -1,4 +1,8 @@
document.write('<p class="menu_header">New and noteworthy</p>')
document.write('<p class="menu"><a href="10reasons.ppt">10 reasons for migrating</a>')
+
+document.write('<p class="menu"><a href="http://javablog.smilehouse.com/blog/default/Java/2007/02/02/Writing-rotated…">Writing rotated and compressed access logs</a>')
+
+
document.write('</p>')
1
0

svn commit: r1383 - in logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse: model reciever views
by noreply.seb@qos.ch 02 Mar '07
by noreply.seb@qos.ch 02 Mar '07
02 Mar '07
Author: seb
Date: Fri Mar 2 17:59:12 2007
New Revision: 1383
Modified:
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/reciever/SimpleSocketServer.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LogbackView.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventLabelProvider.java
Log:
The plugin now saves some informations:
- Evaluators
- Server port
- PatternLayout's pattern
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java Fri Mar 2 17:59:12 2007
@@ -4,6 +4,8 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.ui.IMemento;
+
import ch.qos.logback.classic.boolex.JaninoEventEvaluator;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.Context;
@@ -13,79 +15,90 @@
public class EventFilter {
+ private static final String TAG_FILTER = "filter";
+ private static final String TAG_EXPRESSION = "expression";
+ private static final String TAG_ONMATCH = "onMatch";
+ private static final String TAG_ONMISMATCH = "onMismatch";
+
private static ContextBase context = new ContextBase();
-
+
private static List<EvaluatorFilter> filterList = new ArrayList<EvaluatorFilter>();
-
- static {
- {
- EvaluatorFilter filter = new EvaluatorFilter();
- filter.setContext(context);
- JaninoEventEvaluator eval = new JaninoEventEvaluator();
- eval.setExpression("level == DEBUG");
- eval.setContext(context);
- eval.setName("eval1");
- filter.setEvaluator(eval);
- filter.setName("filter1");
- filter.setOnMatch("ACCEPT");
- eval.start();
- filter.start();
- filterList.add(filter);
- }
- {
- EvaluatorFilter filter = new EvaluatorFilter();
- filter.setContext(context);
- JaninoEventEvaluator eval = new JaninoEventEvaluator();
- eval.setExpression("level == INFO");
- eval.setContext(context);
- eval.setName("eval1");
- filter.setEvaluator(eval);
- filter.setName("filter1");
- filter.setOnMatch("ACCEPT");
- eval.start();
- filter.start();
- filterList.add(filter);
- }
- }
-
+
public static boolean filter(LoggingEvent event) {
if (filterList.isEmpty()) {
return true;
}
-
+
Iterator<EvaluatorFilter> it = filterList.iterator();
EvaluatorFilter filter;
while (it.hasNext()) {
filter = it.next();
FilterReply reply = filter.decide(event);
- if(reply == FilterReply.DENY) {
+ if (reply == FilterReply.DENY) {
return false;
} else if (reply == FilterReply.ACCEPT) {
return true;
}
}
-
+
return true;
}
-
+
public static Context getContext() {
return context;
}
-
+
public static List<EvaluatorFilter> getAllFilters() {
return filterList;
}
-
+
public static void add(EvaluatorFilter filter) {
if (!filterList.contains(filter)) {
filterList.add(filter);
}
}
-
+
public static void remove(EvaluatorFilter filter) {
if (filterList.contains(filter)) {
filterList.remove(filter);
- }
+ }
+ }
+
+ public static void saveState(IMemento memento) {
+ Iterator<EvaluatorFilter> it = filterList.iterator();
+ EvaluatorFilter filter;
+ JaninoEventEvaluator eval;
+ while (it.hasNext()) {
+ filter = it.next();
+ eval = (JaninoEventEvaluator) filter.getEvaluator();
+ IMemento mem = memento.createChild(TAG_FILTER);
+ mem.putString(TAG_EXPRESSION, eval.getExpression());
+ mem.putString(TAG_ONMATCH, filter.getOnMatch().toString());
+ mem.putString(TAG_ONMISMATCH, filter.getOnMismatch().toString());
+ }
}
+ public static void init(IMemento memento) {
+ filterList = new ArrayList<EvaluatorFilter>();
+ EvaluatorFilter filter;
+ JaninoEventEvaluator eval;
+ IMemento[] mems = memento.getChildren(TAG_FILTER);
+ for (int i = 0; i < mems.length; i++) {
+ IMemento mem = mems[i];
+ filter = new EvaluatorFilter();
+ filter.setContext(context);
+ filter.setName("filter " + i);
+ filter.setOnMatch(mem.getString(TAG_ONMATCH));
+ filter.setOnMismatch(mem.getString(TAG_ONMISMATCH));
+ eval = new JaninoEventEvaluator();
+ eval.setContext(context);
+ eval.setName("Eval " + i);
+ eval.setExpression(mem.getString(TAG_EXPRESSION));
+ eval.start();
+ filter.setEvaluator(eval);
+ filter.start();
+ filterList.add(filter);
+ }
+ }
+
}
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/reciever/SimpleSocketServer.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/reciever/SimpleSocketServer.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/reciever/SimpleSocketServer.java Fri Mar 2 17:59:12 2007
@@ -4,6 +4,8 @@
import java.net.ServerSocket;
import java.net.Socket;
+import org.eclipse.ui.IMemento;
+
import ch.qos.logback.eclipse.PluginLogger;
/**
@@ -15,6 +17,9 @@
*/
public class SimpleSocketServer implements Runnable {
+ private static final String TAG_SERVER = "lbserver";
+ private static final String TAG_PORT = "port";
+
private int port = 4321;
private ServerSocket serverSocket;
@@ -50,4 +55,24 @@
PluginLogger.logError(e);
}
}
+
+ public void saveState(IMemento memento) {
+ IMemento mem = memento.createChild(TAG_SERVER);
+ mem.putInteger(TAG_PORT, port);
+ }
+
+ public void init(IMemento memento) {
+ IMemento mem = memento.getChild(TAG_SERVER);
+ if (mem == null) {
+ return;
+ }
+
+ int newPort = mem.getInteger(TAG_PORT);
+
+ if (newPort != 0) {
+ this.port = newPort;
+ }
+
+ }
+
}
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LogbackView.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LogbackView.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LogbackView.java Fri Mar 2 17:59:12 2007
@@ -12,7 +12,10 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IMemento;
import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.MessageConsole;
import org.eclipse.ui.console.TextConsoleViewer;
@@ -21,6 +24,7 @@
import ch.qos.logback.eclipse.PluginLogger;
import ch.qos.logback.eclipse.actions.LogbackFilterAction;
import ch.qos.logback.eclipse.actions.LogbackPreferencesAction;
+import ch.qos.logback.eclipse.model.EventFilter;
import ch.qos.logback.eclipse.model.LoggingEventManager;
import ch.qos.logback.eclipse.reciever.SimpleSocketServer;
@@ -49,8 +53,10 @@
private LogbackPreferencesAction preferencesAction;
private LogbackFilterAction filterAction;
+ private IMemento memento;
+
public LogbackView() {
- launchSocketServer(null);
+ //launchSocketServer(null);
}
public void createPartControl(Composite parent) {
@@ -73,9 +79,16 @@
// new JavaLinkDetector()}, SWT.NONE);
provider = new LoggingEventContentProvider(myConsole, viewer);
+
labelProvider = new LoggingEventLabelProvider();
- provider.setLabelProvider(labelProvider);
+ if (memento != null) {
+ labelProvider.init(memento);
+ EventFilter.init(memento);
+ }
+ provider.setLabelProvider(labelProvider);
+
+
LoggingEventManager.getManager().addLoggingEventManagerListener(provider);
makeActions();
@@ -180,4 +193,26 @@
PluginLogger.logInfo("Now listening on port: " + serverPort);
}
+ private void initServer() {
+ server = new SimpleSocketServer();
+ if (memento != null) {
+ server.init(memento);
+ }
+ serverThread = new Thread(server);
+ serverThread.start();
+ }
+
+ public void saveState(IMemento memento) {
+ super.saveState(memento);
+ EventFilter.saveState(memento);
+ labelProvider.saveState(memento);
+ server.saveState(memento);
+ }
+
+ public void init(IViewSite site, IMemento memento) throws PartInitException {
+ super.init(site, memento);
+ this.memento = memento;
+ initServer();
+ }
+
}
\ No newline at end of file
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventLabelProvider.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventLabelProvider.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventLabelProvider.java Fri Mar 2 17:59:12 2007
@@ -2,6 +2,7 @@
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMemento;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.PatternLayout;
@@ -15,6 +16,9 @@
*/
class LoggingEventLabelProvider extends LabelProvider {
+ private static final String TAG_LABEL = "labelProvider";
+ private static final String TAG_PATTERN = "pattern";
+
private static String DEFAULT_PATTERN = "%relative %level [%thread] %logger{25} %message";
private LoggerContext context;
private PatternLayout patternLayout;
@@ -22,10 +26,6 @@
public LoggingEventLabelProvider() {
context = new LoggerContext();
context.setName("Logback Plugin Context");
- patternLayout = new PatternLayout();
- patternLayout.setContext(context);
- patternLayout.setPattern(DEFAULT_PATTERN);
- patternLayout.start();
}
public String getText(Object element) {
@@ -55,4 +55,35 @@
patternLayout.setPattern(pattern);
patternLayout.start();
}
+
+ public void saveState(IMemento memento) {
+ IMemento mem = memento.createChild(TAG_LABEL);
+ mem.putString(TAG_PATTERN, patternLayout.getPattern());
+ }
+
+ public void init(IMemento memento) {
+ IMemento mem = memento.getChild(TAG_LABEL);
+ if (mem == null) {
+ createDefaultPatternLayout();
+ return;
+ }
+
+ String pattern = mem.getString(TAG_PATTERN);
+ if (pattern == null || pattern.length() == 0) {
+ createDefaultPatternLayout();
+ return;
+ }
+
+ patternLayout = new PatternLayout();
+ patternLayout.setContext(context);
+ patternLayout.setPattern(pattern);
+ patternLayout.start();
+ }
+
+ private void createDefaultPatternLayout() {
+ patternLayout = new PatternLayout();
+ patternLayout.setContext(context);
+ patternLayout.setPattern(DEFAULT_PATTERN);
+ patternLayout.start();
+ }
}
\ No newline at end of file
1
0

02 Mar '07
Author: seb
Date: Fri Mar 2 17:20:26 2007
New Revision: 1382
Modified:
logbackPDE/trunk/plugins/ConsolePlugin/todo.txt
Log:
new idea :)
Modified: logbackPDE/trunk/plugins/ConsolePlugin/todo.txt
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/todo.txt (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/todo.txt Fri Mar 2 17:20:26 2007
@@ -14,6 +14,9 @@
Autoscroll use with double-buffer and stop the filling of the console when auto scroll = off
+Use Cyclic Buffer to allow the user to change the pattern used to display the events. When the pattern
+is changed, we clear the console and re-enter the events contained in the buffer with the new pattern.
+
DONE:
Allow the user to change the socket's port
Make the viewer always display the latest lines added
1
0

svn commit: r1381 - in logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse: dialog model views
by noreply.seb@qos.ch 02 Mar '07
by noreply.seb@qos.ch 02 Mar '07
02 Mar '07
Author: seb
Date: Fri Mar 2 15:37:15 2007
New Revision: 1381
Modified:
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/dialog/LogbackFilterDialog.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/FilterContentProvider.java
logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventContentProvider.java
Log:
Updated EvaluatorFilter editor.
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/dialog/LogbackFilterDialog.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/dialog/LogbackFilterDialog.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/dialog/LogbackFilterDialog.java Fri Mar 2 15:37:15 2007
@@ -2,7 +2,6 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
@@ -62,8 +61,6 @@
editComposite.setSize(1000, 1000);
createEditionUIPart(editComposite);
- //initContent();
-
return container;
}
@@ -182,6 +179,9 @@
current = (EvaluatorFilter)element;
JaninoEventEvaluator eval = (JaninoEventEvaluator)current.getEvaluator();
expressionField.setText(eval.getExpression());
+ matchField.setText(current.getOnMatch().toString());
+ mismatchField.setText(current.getOnMismatch().toString());
+
}
private void saveCurrentFilter() {
@@ -190,6 +190,8 @@
eval.stop();
String oldExp = eval.getExpression();
eval.setExpression(expressionField.getText());
+ current.setOnMatch(matchField.getText());
+ current.setOnMismatch(mismatchField.getText());
eval.start();
if (!eval.isStarted()) {
eval.stop();
@@ -197,6 +199,7 @@
eval.start();
MessageDialog.openInformation(getShell(), "Logback View", ERROR_MESSAGE_EXPRESSION);
}
+ current.start();
EventFilter.add(current);
emptyEditionUI();
}
@@ -222,7 +225,6 @@
current.stop();
JaninoEventEvaluator eval = (JaninoEventEvaluator) current.getEvaluator();
eval.stop();
- EventFilter.remove(current);
FilterContentProvider.getProvider().remove(current);
emptyEditionUI();
}
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/EventFilter.java Fri Mar 2 15:37:15 2007
@@ -1,6 +1,7 @@
package ch.qos.logback.eclipse.model;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import ch.qos.logback.classic.boolex.JaninoEventEvaluator;
@@ -8,6 +9,7 @@
import ch.qos.logback.core.Context;
import ch.qos.logback.core.ContextBase;
import ch.qos.logback.core.filter.EvaluatorFilter;
+import ch.qos.logback.core.spi.FilterReply;
public class EventFilter {
@@ -15,8 +17,6 @@
private static List<EvaluatorFilter> filterList = new ArrayList<EvaluatorFilter>();
- private static EvaluatorFilter first;
-
static {
{
EvaluatorFilter filter = new EvaluatorFilter();
@@ -49,6 +49,22 @@
}
public static boolean filter(LoggingEvent event) {
+ if (filterList.isEmpty()) {
+ return true;
+ }
+
+ Iterator<EvaluatorFilter> it = filterList.iterator();
+ EvaluatorFilter filter;
+ while (it.hasNext()) {
+ filter = it.next();
+ FilterReply reply = filter.decide(event);
+ if(reply == FilterReply.DENY) {
+ return false;
+ } else if (reply == FilterReply.ACCEPT) {
+ return true;
+ }
+ }
+
return true;
}
@@ -67,7 +83,7 @@
}
public static void remove(EvaluatorFilter filter) {
- if (!filterList.contains(filter)) {
+ if (filterList.contains(filter)) {
filterList.remove(filter);
}
}
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/FilterContentProvider.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/FilterContentProvider.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/model/FilterContentProvider.java Fri Mar 2 15:37:15 2007
@@ -46,9 +46,9 @@
case 0:
return eval.getExpression();
case 1:
- return "onMatch";
+ return filter.getOnMatch().toString();
case 2:
- return "onMismatch";
+ return filter.getOnMismatch().toString();
}
return null;
Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventContentProvider.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventContentProvider.java (original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/LoggingEventContentProvider.java Fri Mar 2 15:37:15 2007
@@ -14,7 +14,9 @@
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.LoggingEvent;
+import ch.qos.logback.core.helpers.CyclicBuffer;
import ch.qos.logback.eclipse.PluginLogger;
+import ch.qos.logback.eclipse.model.EventFilter;
import ch.qos.logback.eclipse.model.LoggingEventManagerEvent;
import ch.qos.logback.eclipse.model.LoggingEventManagerListener;
@@ -28,18 +30,21 @@
private MessageConsoleStream redStream;
private MessageConsoleStream blackStream;
private TextConsoleViewer viewer;
-
+
+ private CyclicBuffer<LoggingEvent> cyclicBuffer;
+
private Color cachedRed;
private Color cachedBlack;
private LabelProvider labelProvider;
-
- private boolean autoScroll;
+
+ private boolean autoScroll = true;
public LoggingEventContentProvider(MessageConsole console, TextConsoleViewer viewer) {
Display display = Display.getCurrent();
cachedRed = new Color(display, 255, 0, 0);
cachedBlack = new Color(display, 0, 0, 0);
this.viewer = viewer;
+ this.cyclicBuffer = new CyclicBuffer<LoggingEvent>(4000);
redStream = console.newMessageStream();
redStream.setColor(cachedRed);
@@ -47,7 +52,7 @@
blackStream.setColor(cachedBlack);
}
- WorkbenchJob revealJob = new WorkbenchJob("Reveal End of Document") {//$NON-NLS-1$
+ WorkbenchJob revealJob = new WorkbenchJob("Reveal End of Document") {
public IStatus runInUIThread(IProgressMonitor monitor) {
StyledText textWidget = viewer.getTextWidget();
if (textWidget != null) {
@@ -70,18 +75,22 @@
}
public void loggingEventsChanged(final LoggingEventManagerEvent event) {
- updateViewer(event);
+
+ if (autoScroll) {
+ updateViewer(event);
+ } else {
+ LoggingEvent le = (LoggingEvent) event.getItemsAdded()[0];
+ cyclicBuffer.add(le);
+ }
}
private void updateViewer(final LoggingEventManagerEvent event) {
LoggingEvent le = (LoggingEvent) event.getItemsAdded()[0];
try {
flushStreams();
- if (le.getLevel().isGreaterOrEqual(Level.WARN)) {
- redStream.println(labelProvider.getText(le));
- } else {
- blackStream.println(labelProvider.getText(le));
- }
+
+ writeEvent(le);
+
} catch (Exception e) {
PluginLogger.logError(e);
}
@@ -99,19 +108,67 @@
}
}
+ public void emptyCyclicBuffer() {
+
+ int max = 100;
+
+ int i = 0;
+
+ LoggingEvent le = (LoggingEvent) cyclicBuffer.get();
+ while (le != null) {
+ if (i++ >= max) {
+ try {
+ if (i % 100 == 0) {
+// IOConsolePartitioner idp = (IOConsolePartitioner)redStream.getConsole().getDocument().getDocumentPartitioner();
+// idp.clearBuffer();
+ System.out.println("100 more done: " + i);
+ }
+ } catch (Exception e) {
+
+ }
+ }
+
+ writeEvent(le);
+
+ le = (LoggingEvent) cyclicBuffer.get();
+ }
+ }
+
+ private void writeEvent(LoggingEvent le) {
+ if (!EventFilter.filter(le)) {
+ return;
+ }
+
+ if (le.getLevel().isGreaterOrEqual(Level.WARN)) {
+ redStream.println(labelProvider.getText(le));
+ } else {
+ blackStream.println(labelProvider.getText(le));
+ }
+ }
+
public void setLabelProvider(LabelProvider provider) {
this.labelProvider = provider;
}
-
+
public void setAutoScroll(boolean autoScroll) {
this.autoScroll = autoScroll;
}
-
+
public boolean isAutoScroll() {
return autoScroll;
}
-
+
public void toggleAutoScroll() {
autoScroll = !autoScroll;
+
+ if (!autoScroll) {
+ // if autoScroll is turned off
+ // we clear the buffer first.
+ cyclicBuffer.clear();
+ } else {
+ // if it is turned on
+ // we empty the buffer
+ emptyCyclicBuffer();
+ }
}
}
1
0