[logback-dev] svn commit: r2347 - in logback/trunk/logback-site/src/site/pages: css js manual templates

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Jul 14 19:23:49 CEST 2009


Author: ceki
Date: Tue Jul 14 19:23:48 2009
New Revision: 2347

Added:
   logback/trunk/logback-site/src/site/pages/css/prettify.css
   logback/trunk/logback-site/src/site/pages/js/
   logback/trunk/logback-site/src/site/pages/js/prettify.js
Modified:
   logback/trunk/logback-site/src/site/pages/manual/configuration.html
   logback/trunk/logback-site/src/site/pages/templates/creative.js

Log:
- prettifying manual pages. Started with configuration.html

Added: logback/trunk/logback-site/src/site/pages/css/prettify.css
==============================================================================
--- (empty file)
+++ logback/trunk/logback-site/src/site/pages/css/prettify.css	Tue Jul 14 19:23:48 2009
@@ -0,0 +1,28 @@
+.str{color:#080}
+.kwd{color:#008}
+.com{color:#800}
+.typ{color:#606}
+.lit{color:#066}
+.pun{color:#660}
+.pln{color:#000}
+.tag{color:#008}
+.atn{color:#606}
+.atv{color:#080}
+.dec{color:#606}
+
+pre.prettyprint{
+  padding:2px;
+}
+ at media print{.str{color:#060}
+
+.kwd{
+  color:#006;font-weight:bold}
+  .com{color:#600;font-style:italic
+}
+.typ{color:#404;font-weight:bold}
+.lit{color:#044}
+.pun{color:#440}
+.pln{color:#000}
+.tag{color:#006;font-weight:bold}
+.atn{color:#404}
+.atv{color:#060}}
\ No newline at end of file

Added: logback/trunk/logback-site/src/site/pages/js/prettify.js
==============================================================================
--- (empty file)
+++ logback/trunk/logback-site/src/site/pages/js/prettify.js	Tue Jul 14 19:23:48 2009
@@ -0,0 +1,23 @@
+function H(){var x=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);H=function(){return x};return x}(function(){function x(b){b=b.split(/ /g);var a={};for(var c=b.length;--c>=0;){var d=b[c];if(d)a[d]=null}return a}var y="break continue do else for if return while ",U=y+"auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ",D=U+"catch class delete false import new operator private protected public this throw true try ",
+I=D+"alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",J=D+"boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",V=J+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
+K=D+"debugger eval export function get null set undefined var with Infinity NaN ",L="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",M=y+"and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",N=y+"alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",
+O=y+"case done elif esac eval fi function in local set then until ",W=I+V+K+L+M+N+O;function X(b){return b>="a"&&b<="z"||b>="A"&&b<="Z"}function u(b,a,c,d){b.unshift(c,d||0);try{a.splice.apply(a,b)}finally{b.splice(0,2)}}var Y=(function(){var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue",
+"delete","do","else","finally","instanceof","return","throw","try","typeof"],a="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)";for(var c=0;c<b.length;++c){var d=b[c];a+=X(d.charAt(0))?"|\\b"+d:"|"+d.replace(/([^=<>:&])/g,"\\$1")}a+="|^)\\s*$";return new RegExp(a)})(),P=/&/g,Q=/</g,R=/>/g,Z=/\"/g;function $(b){return b.replace(P,"&amp;").replace(Q,"&lt;").replace(R,"&gt;").replace(Z,"&quot;")}function E(b){return b.replace(P,"&amp;").replace(Q,"&lt;").replace(R,"&gt;")}var aa=
+/&lt;/g,ba=/&gt;/g,ca=/&apos;/g,da=/&quot;/g,ea=/&amp;/g,fa=/&nbsp;/g;function ga(b){var a=b.indexOf("&");if(a<0)return b;for(--a;(a=b.indexOf("&#",a+1))>=0;){var c=b.indexOf(";",a);if(c>=0){var d=b.substring(a+3,c),g=10;if(d&&d.charAt(0)==="x"){d=d.substring(1);g=16}var e=parseInt(d,g);if(!isNaN(e))b=b.substring(0,a)+String.fromCharCode(e)+b.substring(c+1)}}return b.replace(aa,"<").replace(ba,">").replace(ca,"'").replace(da,'"').replace(ea,"&").replace(fa," ")}function S(b){return"XMP"===b.tagName}
+function z(b,a){switch(b.nodeType){case 1:var c=b.tagName.toLowerCase();a.push("<",c);for(var d=0;d<b.attributes.length;++d){var g=b.attributes[d];if(!g.specified)continue;a.push(" ");z(g,a)}a.push(">");for(var e=b.firstChild;e;e=e.nextSibling)z(e,a);if(b.firstChild||!/^(?:br|link|img)$/.test(c))a.push("</",c,">");break;case 2:a.push(b.name.toLowerCase(),'="',$(b.value),'"');break;case 3:case 4:a.push(E(b.nodeValue));break}}var F=null;function ha(b){if(null===F){var a=document.createElement("PRE");
+a.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));F=!/</.test(a.innerHTML)}if(F){var c=b.innerHTML;if(S(b))c=E(c);return c}var d=[];for(var g=b.firstChild;g;g=g.nextSibling)z(g,d);return d.join("")}function ia(b){var a=0;return function(c){var d=null,g=0;for(var e=0,h=c.length;e<h;++e){var f=c.charAt(e);switch(f){case "\t":if(!d)d=[];d.push(c.substring(g,e));var i=b-a%b;a+=i;for(;i>=0;i-="                ".length)d.push("                ".substring(0,i));g=e+1;break;
+case "\n":a=0;break;default:++a}}if(!d)return c;d.push(c.substring(g));return d.join("")}}var ja=/(?:[^<]+|<!--[\s\S]*?--\>|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g,ka=/^<!--/,la=/^<\[CDATA\[/,ma=/^<br\b/i;function na(b){var a=b.match(ja),c=[],d=0,g=[];if(a)for(var e=0,h=a.length;e<h;++e){var f=a[e];if(f.length>1&&f.charAt(0)==="<"){if(ka.test(f))continue;if(la.test(f)){c.push(f.substring(9,f.length-3));d+=f.length-12}else if(ma.test(f)){c.push("\n");++d}else g.push(d,f)}else{var i=ga(f);
+c.push(i);d+=i.length}}return{source:c.join(""),tags:g}}function v(b,a){var c={};(function(){var g=b.concat(a);for(var e=g.length;--e>=0;){var h=g[e],f=h[3];if(f)for(var i=f.length;--i>=0;)c[f.charAt(i)]=h}})();var d=a.length;return function(g,e){e=e||0;var h=[e,"pln"],f="",i=0,j=g;while(j.length){var o,m=null,k,l=c[j.charAt(0)];if(l){k=j.match(l[1]);m=k[0];o=l[0]}else{for(var n=0;n<d;++n){l=a[n];var p=l[2];if(p&&!p.test(f))continue;k=j.match(l[1]);if(k){m=k[0];o=l[0];break}}if(!m){o="pln";m=j.substring(0,
+1)}}h.push(e+i,o);i+=m.length;j=j.substring(m.length);if(o!=="com"&&/\S/.test(m))f=m}return h}}var oa=v([],[["pln",/^[^<]+/,null],["dec",/^<!\w[^>]*(?:>|$)/,null],["com",/^<!--[\s\S]*?(?:--\>|$)/,null],["src",/^<\?[\s\S]*?(?:\?>|$)/,null],["src",/^<%[\s\S]*?(?:%>|$)/,null],["src",/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],["tag",/^<\/?\w[^<>]*>/,null]]);function pa(b){var a=oa(b);for(var c=0;c<a.length;c+=2)if(a[c+1]==="src"){var d,g;d=a[c];g=c+2<a.length?a[c+2]:b.length;var e=b.substring(d,
+g),h=e.match(/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/);if(h)a.splice(c,2,d,"tag",d+h[1].length,"src",d+h[1].length+(h[2]||"").length,"tag")}return a}var qa=v([["atv",/^\'[^\']*(?:\'|$)/,null,"'"],["atv",/^\"[^\"]*(?:\"|$)/,null,'"'],["pun",/^[<>\/=]+/,null,"<>/="]],[["tag",/^[\w:\-]+/,/^</],["atv",/^[\w\-]+/,/^=/],["atn",/^[\w:\-]+/,null],["pln",/^\s+/,null," \t\r\n"]]);function ra(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="tag"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=b.substring(g,
+e),f=qa(h,g);u(f,a,c,2);c+=f.length-2}}return a}function r(b){var a=[],c=[];if(b.tripleQuotedStrings)a.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]);else if(b.multiLineStrings)a.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]);else a.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+null,"\"'"]);c.push(["pln",/^(?:[^\'\"\`\/\#]+)/,null," \r\n"]);if(b.hashComments)a.push(["com",/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments)c.push(["com",/^\/\/[^\r\n]*/,null]);if(b.regexLiterals)c.push(["str",/^\/(?:[^\\\*\/\[]|\\[\s\S]|\[(?:[^\]\\]|\\.)*(?:\]|$))+(?:\/|$)/,Y]);if(b.cStyleComments)c.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]);var d=x(b.keywords);b=null;var g=v(a,c),e=v([],[["pln",/^\s+/,null," \r\n"],["pln",/^[a-z_$@][a-z_$@0-9]*/i,null],["lit",/^0x[a-f0-9]+[a-z]/i,null],["lit",
+/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i,null,"123456789"],["pun",/^[^\s\w\.$@]+/,null]]);function h(f,i){for(var j=0;j<i.length;j+=2){var o=i[j+1];if(o==="pln"){var m,k,l,n;m=i[j];k=j+2<i.length?i[j+2]:f.length;l=f.substring(m,k);n=e(l,m);for(var p=0,t=n.length;p<t;p+=2){var w=n[p+1];if(w==="pln"){var A=n[p],B=p+2<t?n[p+2]:l.length,s=f.substring(A,B);if(s===".")n[p+1]="pun";else if(s in d)n[p+1]="kwd";else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(s))n[p+1]=s.charAt(0)==="@"?"lit":
+"typ"}}u(n,i,j,2);j+=n.length-2}}return i}return function(f){var i=g(f);i=h(f,i);return i}}var G=r({keywords:W,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function sa(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="src"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=G(b.substring(g,e));for(var f=0,i=h.length;f<i;f+=2)h[f]+=g;u(h,a,c,2);c+=h.length-2}}return a}function ta(b,a){var c=false;for(var d=0;d<a.length;d+=2){var g=a[d+1],e,h;if(g==="atn"){e=
+a[d];h=d+2<a.length?a[d+2]:b.length;c=/^on|^style$/i.test(b.substring(e,h))}else if(g==="atv"){if(c){e=a[d];h=d+2<a.length?a[d+2]:b.length;var f=b.substring(e,h),i=f.length,j=i>=2&&/^[\"\']/.test(f)&&f.charAt(0)===f.charAt(i-1),o,m,k;if(j){m=e+1;k=h-1;o=f}else{m=e+1;k=h-1;o=f.substring(1,f.length-1)}var l=G(o);for(var n=0,p=l.length;n<p;n+=2)l[n]+=m;if(j){l.push(k,"atv");u(l,a,d+2,0)}else u(l,a,d,2)}c=false}}return a}function ua(b){var a=pa(b);a=ra(b,a);a=sa(b,a);a=ta(b,a);return a}function va(b,
+a,c){var d=[],g=0,e=null,h=null,f=0,i=0,j=ia(8);function o(k){if(k>g){if(e&&e!==h){d.push("</span>");e=null}if(!e&&h){e=h;d.push('<span class="',e,'">')}var l=E(j(b.substring(g,k))).replace(/(\r\n?|\n| ) /g,"$1&nbsp;").replace(/\r\n?|\n/g,"<br />");d.push(l);g=k}}while(true){var m;m=f<a.length?(i<c.length?a[f]<=c[i]:true):false;if(m){o(a[f]);if(e){d.push("</span>");e=null}d.push(a[f+1]);f+=2}else if(i<c.length){o(c[i]);h=c[i+1];i+=2}else break}o(b.length);if(e)d.push("</span>");return d.join("")}
+var C={};function q(b,a){for(var c=a.length;--c>=0;){var d=a[c];if(!C.hasOwnProperty(d))C[d]=b;else if("console"in window)console.log("cannot override language handler %s",d)}}q(G,["default-code"]);q(ua,["default-markup","html","htm","xhtml","xml","xsl"]);q(r({keywords:I,hashComments:true,cStyleComments:true}),["c","cc","cpp","cs","cxx","cyc"]);q(r({keywords:J,cStyleComments:true}),["java"]);q(r({keywords:O,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);q(r({keywords:M,hashComments:true,
+multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);q(r({keywords:L,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);q(r({keywords:N,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);q(r({keywords:K,cStyleComments:true,regexLiterals:true}),["js"]);function T(b,a){try{var c=na(b),d=c.source,g=c.tags;if(!C.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";var e=C[a].call({},d);return va(d,g,e)}catch(h){if("console"in window){console.log(h);
+console.trace()}return b}}function wa(b){var a=H(),c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[];for(var g=0;g<c.length;++g)for(var e=0;e<c[g].length;++e)d.push(c[g][e]);c=null;var h=0;function f(){var i=(new Date).getTime()+250;for(;h<d.length&&(new Date).getTime()<i;h++){var j=d[h];if(j.className&&j.className.indexOf("prettyprint")>=0){var o=j.className.match(/\blang-(\w+)\b/);if(o)o=o[1];var m=false;for(var k=j.parentNode;k;k=
+k.parentNode)if((k.tagName==="pre"||k.tagName==="code"||k.tagName==="xmp")&&k.className&&k.className.indexOf("prettyprint")>=0){m=true;break}if(!m){var l=ha(j);l=l.replace(/(?:\r\n?|\n)$/,"");var n=T(l,o);if(!S(j))j.innerHTML=n;else{var p=document.createElement("PRE");for(var t=0;t<j.attributes.length;++t){var w=j.attributes[t];if(w.specified)p.setAttribute(w.name,w.value)}p.innerHTML=n;j.parentNode.replaceChild(p,j);p=j}if(a&&j.tagName==="PRE"){var A=j.getElementsByTagName("br");for(var B=A.length;--B>=
+0;){var s=A[B];s.parentNode.replaceChild(document.createTextNode("\r\n"),s)}}}}}if(h<d.length)setTimeout(f,250);else if(b)b()}f()}window.PR_normalizedHtml=z;window.prettyPrintOne=T;window.prettyPrint=wa;window.PR={createSimpleLexer:v,registerLangHandler:q,sourceDecorator:r,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();

Modified: logback/trunk/logback-site/src/site/pages/manual/configuration.html
==============================================================================
--- logback/trunk/logback-site/src/site/pages/manual/configuration.html	(original)
+++ logback/trunk/logback-site/src/site/pages/manual/configuration.html	Tue Jul 14 19:23:48 2009
@@ -9,9 +9,13 @@
     <link rel="stylesheet" type="text/css" href="../css/common.css" />
     <link rel="stylesheet" type="text/css" href="../css/screen.css" media="screen" />
     <link rel="stylesheet" type="text/css" href="../css/_print.css" media="print" />
+    <link rel="stylesheet" type="text/css" href="../css/prettify.css" media="screen" />
+
   </head>
-  <body>
+  <body onload="prettyPrint()">
+
     <script type="text/javascript">prefix='../'</script>
+    <script type="text/javascript" src="../js/prettify.js"></script>
     <script src="../templates/header.js" type="text/javascript"></script>
     <div id="left">
       <noscript>Please turn on Javascript to view this menu</noscript>
@@ -128,7 +132,7 @@
     <code>BasicConfigurator</code> usage <a
     href="../xref/chapter3/MyApp1.html">(logback-examples/src/main/java/chapter3/MyApp1.java)</a></em>
 
-    <p class="source">package chapter3;
+    <pre class="prettyprint source">package chapter3;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -143,7 +147,7 @@
     foo.doIt();
     logger.info("Exiting application.");
   }
-}</p>
+}</pre>
 
   <p>This class defines a static logger variable. It then
   instantiates a Foo object. The Foo class is listed below:
@@ -153,7 +157,7 @@
   <a href="../xref/chapter3/Foo.html">(logback-examples/src/main/java/chapter3/Foo.java)</a>
   </em>
 
-  <p class="source">package chapter3;
+  <pre class="prettyprint source">package chapter3;
   
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -164,7 +168,7 @@
   public void doIt() {
     logger.debug("Did it again!");
   }
-}</p>
+}</pre>
 
 
     <p>In order to run the examples in this chapter, you need to make
@@ -220,7 +224,7 @@
   (logback-examples/src/main/java/chapter3/sample0.xml)</em></p>
 
 
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     &lt;layout class="ch.qos.logback.classic.PatternLayout">
@@ -231,7 +235,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
    <p>After you have renamed <em>sample0.xml</em> as
    <em>logback.xml</em> (or <em>logback-test.xml</em>) place it into a
@@ -253,14 +257,14 @@
     href="../xref/chapter3/MyApp2.html">(logback-examples/src/main/java/chapter3/MyApp2.java)</a></em>
 
   
-<div class="source"><pre>
+<pre class="prettyprint lang-java source">
   public static void main(String[] args) {
     // assume SLF4J is bound to logback in the current environment
     <b>LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();</b>
     // print logback's internal status
     <b>StatusPrinter.print(lc);</b>
     ...
-  }</pre></div>
+  }</pre>
 
   <p>If everything goes well, you should see the following output on the console</p>
 
@@ -301,7 +305,7 @@
    using debug mode
    (logback-examples/src/main/java/chapter3/sample1.xml)</em>
 
-<div class="source"><pre>
+<pre class="prettyprint source">
 &lt;configuration <b>debug="true"</b>> 
 
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> 
@@ -313,7 +317,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
   
    <p>Setting the <code>debug</code> attribute within the
    &lt;configuration&gt; element will output status information, under
@@ -364,7 +368,7 @@
    <code>JoranConfigurator</code> directly <a
    href="../xref/chapter3/MyApp3.html">(logback-examples/src/main/java/chapter3/MyApp3.java)</a></em></p>
 
-<div class="source"><pre>package chapter3;
+<pre class="prettyprint source">package chapter3;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -399,7 +403,7 @@
     foo.doIt();
     logger.info("Exiting application.");
   }
-}</pre></div>
+}</pre>
 
    <p>This application fetches the <code>LoggerContext</code>
    currently in effect, creates a new <code>JoranConfigurator</code>,
@@ -443,7 +447,7 @@
    <p>To add this servlet to your web-application, add the following
    lines to its <em>WEB-INF/web.xml</em> file.</p>
 
-   <p class="source">  &lt;servlet>
+   <pre class="prettyprint source">  &lt;servlet>
     &lt;servlet-name>ViewStatusMessages&lt;/servlet-name>
     &lt;servlet-class>ch.qos.logback.classic.ViewStatusMessagesServlet&lt;/servlet-class>
   &lt;/servlet>
@@ -451,7 +455,7 @@
   &lt;servlet-mapping>
     &lt;servlet-name>ViewStatusMessages&lt;/servlet-name>
     &lt;url-pattern>/lbClassicStatus&lt;/url-pattern>
-  &lt;/servlet-mapping></p>
+  &lt;/servlet-mapping></pre>
    
    <p>The <code>ViewStatusMessages</code> servlet will viewable under
    the URL <code>http://host/yourWebapp/lbClassicStatus</code>
@@ -485,10 +489,10 @@
    StatusManager.
    </p>
 
-   <p class="source">   LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); 
+   <pre class="prettyprint source">   LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); 
    StatusManager statusManager = lc.getStatusManager();
    OnConsoleStatusListener onConsoleListener = new OnConsoleStatusListener();
-   statusManager.add(onConsoleListener);</p>
+   statusManager.add(onConsoleListener);</pre>
 
    <p>Note that the registered status listener will receive status
    events subsequent to its registration. It will not receive prior
@@ -499,11 +503,11 @@
 
   <p><em>Example 3.<span class="autoEx"/>: Registering a status listener (logback-examples/src/main/java/chapter3/onConsoleStatusListener.xml)</em></p>
 
-   <p class="source">&lt;configuration>
+   <pre class="prettyprint source">&lt;configuration>
   <b>&lt;statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /></b>  
 
   ... the rest of the configuration file  
-&lt;/configuration></p>
+&lt;/configuration></pre>
 
    <p>One may also register a status listener by setting the
    "logback.statusListenerClass" Java system property to the name of
@@ -611,7 +615,7 @@
   </p>
 
 <em>Example 3.<span class="autoEx"/>: Setting the level of a logger (logback-examples/src/main/java/chapter3/sample2.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     &lt;layout class="ch.qos.logback.classic.PatternLayout">
@@ -627,14 +631,14 @@
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>  
   
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>This new configuration will yield the following output, when
   invoked with the <em>MyApp3</em> application.
   </p>
 
-<div class="source"><pre>17:34:07.578 [main] INFO  chapter3.MyApp3 - Entering application.
-17:34:07.578 [main] INFO  chapter3.MyApp3 - Exiting application.</pre></div>
+<pre class="source">17:34:07.578 [main] INFO  chapter3.MyApp3 - Entering application.
+17:34:07.578 [main] INFO  chapter3.MyApp3 - Exiting application.</pre>
 
   <p>You can configure the levels of as many loggers as you wish.  In
   the next configuration file, we set the level of the
@@ -643,7 +647,7 @@
   </p>
 
 <em>Example 3.<span class="autoEx"/>: Setting the level of multiple loggers (logback-examples/src/main/java/chapter3/sample3.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="source prettyprint">&lt;configuration>
 
   &lt;appender name="STDOUT"
     class="ch.qos.logback.core.ConsoleAppender">
@@ -661,15 +665,15 @@
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>Running <code>MyApp3</code> with this configuration file will
   result in the following output on the console:
   </p>
 
-<div class="source"><pre>17:39:27.593 [main] INFO  chapter3.MyApp3 - Entering application.
+<p class="prettyprint source">17:39:27.593 [main] INFO  chapter3.MyApp3 - Entering application.
 17:39:27.593 [main] DEBUG chapter3.Foo - Did it again!
-17:39:27.593 [main] INFO  chapter3.MyApp3 - Exiting application.</pre></div>
+17:39:27.593 [main] INFO  chapter3.MyApp3 - Exiting application.</p>
 
    <p>The table below list the loggers and their levels, after
    <code>JoranConfigurator</code> has configured logback with the
@@ -723,7 +727,7 @@
 
   <em>Example 3.<span class="autoEx"/>: Logger level sample
   (logback-examples/src/main/java/chapter3/sample4.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="STDOUT"
    class="ch.qos.logback.core.ConsoleAppender">
@@ -741,7 +745,7 @@
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
 
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>The following table lists the loggers and their levels after
   applying the <em>sample4.xml</em> configuration file.
@@ -830,7 +834,7 @@
   </p>
 
 <em>Example 3.<span class="autoEx"/>: Multiple loggers (logback-examples/src/main/java/chapter3/multiple.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="<b>FILE</b>" class="ch.qos.logback.core.FileAppender">
     &lt;file>myApp.log&lt;/file>
@@ -851,7 +855,7 @@
     <b>&lt;appender-ref ref="FILE" />
     &lt;appender-ref ref="STDOUT" /></b>
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>This configuration scripts defines two appenders called
   <em>FILE</em> and <em>STDOUT</em>.  The <em>FILE</em> appender logs
@@ -880,7 +884,7 @@
 
   <em>Example 3.<span class="autoEx"/>: Duplicate appender
   (logback-examples/src/main/java/chapter3/duplicate.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     &lt;layout class="ch.qos.logback.classic.PatternLayout">
@@ -895,18 +899,18 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>Running <code>MyApp3</code> with <em>duplicate.xml</em> will
   yield the following output:
   </p>
 
-<div class="source"><pre>14:25:36.343 [main] INFO  chapter3.MyApp3 - Entering application.
+<p class="source">14:25:36.343 [main] INFO  chapter3.MyApp3 - Entering application.
 14:25:36.343 [main] INFO  chapter3.MyApp3 - Entering application.
 14:25:36.359 [main] DEBUG chapter3.Foo - Did it again!
 14:25:36.359 [main] DEBUG chapter3.Foo - Did it again!
 14:25:36.359 [main] INFO  chapter3.MyApp3 - Exiting application.
-14:25:36.359 [main] INFO  chapter3.MyApp3 - Exiting application.</pre></div>
+14:25:36.359 [main] INFO  chapter3.MyApp3 - Exiting application.</p>
 
   <p>Notice the duplicated output. The appender named <em>STDOUT</em>
   is attached to two loggers, to root and to <em>chapter3</em>. Since
@@ -926,7 +930,7 @@
 
   <em>Example 3.<span class="autoEx"/>: Multiple appender
   (logback-examples/src/main/java/chapter3/restricted.xml)</em>
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="FILE" class="ch.qos.logback.core.FileAppender">
     &lt;file>myApp.log&lt;/file>
@@ -948,7 +952,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>In this example, the console appender will log all the messages
   (for all loggers in the system) whereas only logging request
@@ -966,7 +970,7 @@
   </p>
 
 <em>Example 3.<span class="autoEx"/>: Additivity flag (logback-examples/src/main/java/chapter3/additivityFlag.xml)</em>
-<div class="source"><pre>&lt;configuration>
+<pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="FILE" class="ch.qos.logback.core.FileAppender">
     &lt;file>foo.log&lt;/file>
@@ -988,7 +992,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>This example, the appender named <em>FILE</em> is attached to the
   <em>chapter3.Foo</em> logger. Moreover, the <em>chapter3.Foo</em>
@@ -1028,7 +1032,7 @@
   (logback-examples/src/main/java/chapter3/variableSubstitution1.xml)
   </em>
 
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
 
   <b>&lt;property name="USER_HOME" value="/home/sebastien" /></b>
 
@@ -1043,7 +1047,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
 
   <p>The next example shows the use of a System property to achieve
@@ -1058,7 +1062,7 @@
   (logback-examples/src/main/java/chapter3/variableSubstitution2.xml)
   </em>
   
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
 
   &lt;appender name="FILE"
     class="ch.qos.logback.core.FileAppender">
@@ -1071,7 +1075,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   
   <p>When multiple variables are needed, it may be more convenient to
@@ -1084,7 +1088,7 @@
   (logback-examples/src/main/java/chapter3/variableSubstitution3.xml)
   </em>
 
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
 
   <b>&lt;property file="src/main/java/chapter3/variables1.properties" /></b>
 
@@ -1099,7 +1103,7 @@
    &lt;root level="debug">
      &lt;appender-ref ref="FILE" />
    &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
    <p>This configuration file contains a reference to a file named
    <em>variables1.properties</em>.  The variables contained in that
@@ -1111,12 +1115,12 @@
    <em>Example 3.<span class="autoEx"/>: Variable file
    (logback-examples/src/main/java/chapter3/variables1.properties)</em>
 
-   <div class="source"><pre>USER_HOME=/home/sebastien</pre></div>
+   <pre class="source">USER_HOME=/home/sebastien</pre>
 
    <p>You may also reference a resource on the class path instead of a
    file.</p>
 
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
 
   <b>&lt;property resource="resource1.properties" /></b>
 
@@ -1131,10 +1135,7 @@
    &lt;root level="debug">
      &lt;appender-ref ref="FILE" />
    &lt;/root>
-&lt;/configuration></pre></div>
-
-
-   
+&lt;/configuration></pre>
 
    <h4>Nested variable substitution</h4>
 
@@ -1150,9 +1151,9 @@
    <em>Example 3.<span class="autoEx"/>: Nested variable references
    (logback-examples/src/main/java/chapter3/variables2.properties)</em>
 
-   <div class="source"><pre>USER_HOME=/home/sebastien
+   <pre class="source">USER_HOME=/home/sebastien
 fileName=myApp.log
-<b>destination=${USER_HOME}/${fileName}</b></pre></div>
+<b>destination=${USER_HOME}/${fileName}</b></pre>
 
     <p>Note that in the properties file above, "destination" is
     composed out of two other variables, namely "USER_HOME" and
@@ -1163,7 +1164,7 @@
     a separate file
     (logback-examples/src/main/java/chapter3/variableSubstitution4.xml)</em>
 
-    <div class="source"><pre>&lt;configuration>
+    <pre class="prettyprint source">&lt;configuration>
 
   &lt;property file="variables2.properties" />
 
@@ -1178,7 +1179,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="FILE" />
   &lt;/root>
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <h4><a name="defaultValuesForVariables"
   href="#defaultValuesForVariables">Default substitution values for
@@ -1206,14 +1207,14 @@
   <em>Example 3.<span class="autoEx"/>: File include
   (logback-examples/src/main/java/chapter3/containingConfig.xml)</em>
 
-  <div class="source"><pre>&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
   <b>&lt;include file="src/main/java/chapter3/includedConfig.xml"/></b>
 
   &lt;root level="DEBUG">
     &lt;appender-ref ref="includedConsole" />
   &lt;/root>
 
-&lt;/configuration></pre></div>
+&lt;/configuration></pre>
 
   <p>The target file MUST have its elements nested inside an
   <code>&lt;included></code> element. For example, a
@@ -1223,13 +1224,13 @@
   <em>Example 3.<span class="autoEx"/>: File include
   (logback-examples/src/main/java/chapter3/includedConfig.xml)</em>
 
-  <p class="source"><b class="green">&lt;included></b>
+  <pre class="source"><b class="green big">&lt;included></b>
   &lt;appender name="includedConsole" class="ch.qos.logback.core.ConsoleAppender">
     &lt;layout class="ch.qos.logback.classic.PatternLayout">
       &lt;Pattern>"%d - %m%n"&lt;/Pattern>
     &lt;/layout>
   &lt;/appender>
-<b class="green">&lt;/included></b></p>
+<b class="green big">&lt;/included></b></pre>
 
   <p>The file to be included can be referenced as a file, as a URL or
   as a resource. To reference a file use the <span
@@ -1255,7 +1256,7 @@
   
   <em>Example 3.<span class="autoEx"/>: Set the context name and display it
   (logback-examples/src/main/java/chapter3/contextName.xml)</em>
-  <p class="source">&lt;configuration>
+  <pre class="prettyprint source">&lt;configuration>
   <b>&lt;contextName>myAppName&lt;/contextName></b>
   &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
     &lt;layout class="ch.qos.logback.classic.PatternLayout">
@@ -1266,7 +1267,7 @@
   &lt;root level="debug">
     &lt;appender-ref ref="STDOUT" />
   &lt;/root>
-&lt;/configuration></p>
+&lt;/configuration></pre>
 
   <p>This last examples illustrates naming of the logger
   context. Adding the the <a
@@ -1285,7 +1286,7 @@
 
    <em>Example 3.<span class="autoEx"/>: Insert as properties env-entries obtained via JNDI
   (logback-examples/src/main/java/chapter3/insertFromJNDI.xml)</em>
-   <p class="source">&lt;configuration>
+   <pre class="prettyprint source">&lt;configuration>
   <b>&lt;insertFromJNDI env-entry-name="java:comp/env/appName" as="<span class="green">appName"</span> /></b>
   <b>&lt;contextName><span class="green">${appName}</span>&lt;/contextName></b>
 
@@ -1298,7 +1299,7 @@
   &lt;root level="DEBUG">
     &lt;appender-ref ref="CONSOLE" />
   &lt;/root>
-&lt;/configuration></p>
+&lt;/configuration></pre>
 
   <p>In this last example, the "java:comp/env/appName" env-entry is
   inserted as the <span class="variable">appName</span> property. Note

Modified: logback/trunk/logback-site/src/site/pages/templates/creative.js
==============================================================================
--- logback/trunk/logback-site/src/site/pages/templates/creative.js	(original)
+++ logback/trunk/logback-site/src/site/pages/templates/creative.js	Tue Jul 14 19:23:48 2009
@@ -1,11 +1,11 @@
-document.write('		<table style="margin-left: 0em; padding-top=0ex" cellpadding="0" ');
+document.write('		<table style="margin-left: 0em; padding-top:0ex" cellpadding="0" ');
 document.write('           cellspacing="0" width="70%">');
 document.write('      <tr>');
 document.write('        <td>        ');
 document.write('          <p class="author">');
 document.write('            Authors: Ceki G&#252;lc&#252;, S&#233;bastien Pennec');
 document.write('          <br/>');
-document.write('          Copyright &#169; 2000-2008, QOS.ch</p>');
+document.write('          Copyright &#169; 2000-2009, QOS.ch</p>');
 document.write('        </td>');
 document.write('        <td>');
 document.write('            <a rel="license"');


More information about the logback-dev mailing list