[Logging-commits] r55 - www
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Nov 3 11:21:50 CET 2010
Author: mariotomo
Date: 2010-11-03 11:21:50 +0100 (Wed, 03 Nov 2010)
New Revision: 55
Modified:
www/integration_with_R.shtml
Log:
correcting typesetting of code and tt.
Modified: www/integration_with_R.shtml
===================================================================
--- www/integration_with_R.shtml 2010-11-03 08:55:31 UTC (rev 54)
+++ www/integration_with_R.shtml 2010-11-03 10:21:50 UTC (rev 55)
@@ -4,19 +4,19 @@
<blockquote><font size=-1>thanks Henrico Witvliet for this hint</font></blockquote>
<p>you can instruct R to send its text to a logger using the function
-<code>withCallingHandlers</code>. combine this with
-<code>options(warn=-1)</code> and you have replaced the R built in
+<tt>withCallingHandlers</tt>. combine this with
+<tt>options(warn=-1)</tt> and you have replaced the R built in
warning logic with the logging package.
-<p>imagine you want all warnings in function <code>F</code> go to
-logger <code>L</code>, you use this construction:
+<p>imagine you want all warnings in function <tt>F</tt> go to
+logger <tt>L</tt>, you use this construction:
<p><code>
-<R-global>withCallingHandlers</R-global>(<R-global>F</R-global>(), <br/>
- warning=<R-reserved>function</R-reserved>(w) { <R-global>logwarn</R-global>(w, logger=L) })
+withCallingHandlers(F(), <br/>
+ <R-reserved>warning</R-reserved>=<R-reserved>function</R-reserved>(w) { logwarn(w, logger=L) })
</code>
-<p>try it with, for example, <code>log(-1)</code>.
+<p>try it with, for example, <tt>log(-1)</tt>.
<p><code>
> <user>withCallingHandlers(log(-1), warning = function(w){logwarn(w, logger='mylogger')})</user><br/>
More information about the Logging-commits
mailing list