[Logging-commits] r15 - www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 7 16:56:37 CEST 2010


Author: mariotomo
Date: 2010-04-07 16:56:37 +0200 (Wed, 07 Apr 2010)
New Revision: 15

Modified:
   www/index.php
   www/sample_session.html
Log:
typos and extending.


Modified: www/index.php
===================================================================
--- www/index.php	2010-04-07 13:45:12 UTC (rev 14)
+++ www/index.php	2010-04-07 14:56:37 UTC (rev 15)
@@ -55,7 +55,7 @@
 <li>a simple basicConfig function to quickly put yourself in a usable situation...</li>
 </ul></p>
 
-<p>have a look at a short introductiory <a href="sample_session.html">sample session</a>.</p>
+<p>have a look at a short introductory <a href="sample_session.html">sample session</a>.</p>
 
 <p>This package owes a lot to 
 <ul>

Modified: www/sample_session.html
===================================================================
--- www/sample_session.html	2010-04-07 13:45:12 UTC (rev 14)
+++ www/sample_session.html	2010-04-07 14:56:37 UTC (rev 15)
@@ -1,8 +1,8 @@
 <html>
 <body>
-<h4>annotated sample sessions</h4>
+<h3>annotated sample sessions</h3>
 
-<h5>the basics</h5>
+<h4>the basics</h4>
 
 <p>in this session we work with one single logger, the root logger, and we use only console handlers</p>
 
@@ -30,9 +30,10 @@
 R>
 </pre>
 
-<p>we add an other handler to the console, without specifying it name.
-it gets one automatically from the name of the function.  you can add
-and remove handlers using their names.</p>
+<p>we add an other handler to the console, without specifying its
+name.  it gets one automatically from the name of the function.  you
+can add and remove handlers using their names.  you can also refer to
+them by function, if that is the way you defined it.</p>
 
 <pre>
 R> addHandler(writeToConsole)
@@ -67,7 +68,35 @@
 R> 
 </pre>
 
-<h5>hierarchical loggers</h5>
+<h4>hierarchical loggers</h4>
+
+<p>in the previous section we have worked -implicitly- with one
+logger, the root logger.  we can refer to it explicitly: its name is
+the empty string.</p>
+
+<pre>
+R> with(getLogger(logger=''), names(handlers))
+[1] "basic.stdout"
+</pre>
+
+<p>when issuing a logging record, you can specify to which logger you
+want to send it.  the logger will offer it to all its attached
+handlers and then pass it to its parent logger.  loggers are organized
+hierarchically, in a way that is similar to the way directories are
+organized.  </p>
+
+<p>just as directories contain files, loggers contain handlers and
+their name is, within the logger, unique.  also similarly than to
+directories, all loggers have one parent, except the root logger that
+has none.  the name of the logger specifies the location of the logger
+in this hierarchy.  an example will hopefully clarify:</p>
+
+<pre>
+R> loginfo('chiarastella', logger='libro.romanzo.campanile')
+</pre>
+
+if you define a logger by this name, all record you 
+
 <h5>logging to file</h5>
 <h5>formatting your log record</h5>
 



More information about the Logging-commits mailing list