[Logging-commits] r95 - pkg/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 20 10:34:46 CEST 2011
Author: mariotomo
Date: 2011-09-20 10:34:46 +0200 (Tue, 20 Sep 2011)
New Revision: 95
Removed:
pkg/man/removeHandler.Rd
Modified:
pkg/man/addHandler.Rd
pkg/man/getHandler.Rd
Log:
defining some examples, refactoring documentation.
Modified: pkg/man/addHandler.Rd
===================================================================
--- pkg/man/addHandler.Rd 2011-09-20 08:20:14 UTC (rev 94)
+++ pkg/man/addHandler.Rd 2011-09-20 08:34:46 UTC (rev 95)
@@ -3,14 +3,13 @@
\name{addHandler}
\alias{addHandler}
-\title{add a handler to a logger}
+\alias{removeHandler}
\description{
- creates a new named handler list, attaches it to the specified logger
- and registers a defines a function as a handler of log records going through the
- specified logger.
+ use these functions to maintain the list of handlers attached to a logger.
}
+\title{add a handler to or remove one from a logger}
\details{
\dots may contain extra parameters that will be passed to the handler
@@ -29,6 +28,7 @@
}
\usage{
addHandler(handler, ..., logger = "")
+removeHandler(handler, logger='')
}
\arguments{
\item{handler}{the name of the handler, or its action}
@@ -36,3 +36,11 @@
\item{logger}{the name of the logger to which to attach the new
handler, defaults to the root logger}
}
+\examples{
+logReset()
+addHandler(writeToConsole)
+names(getLogger()[['handlers']])
+loginfo('test')
+removeHandler('writeToConsole')
+logwarn('test')
+}
\ No newline at end of file
Modified: pkg/man/getHandler.Rd
===================================================================
--- pkg/man/getHandler.Rd 2011-09-20 08:20:14 UTC (rev 94)
+++ pkg/man/getHandler.Rd 2011-09-20 08:34:46 UTC (rev 95)
@@ -23,3 +23,8 @@
\item{handler}{the name of the handler, or its action.}
\item{logger}{optional: the name of the logger. defaults to the root logger.}
}
+\examples{
+logReset()
+addHandler(writeToConsole)
+getHandler('writeToConsole')
+}
\ No newline at end of file
Deleted: pkg/man/removeHandler.Rd
===================================================================
--- pkg/man/removeHandler.Rd 2011-09-20 08:20:14 UTC (rev 94)
+++ pkg/man/removeHandler.Rd 2011-09-20 08:34:46 UTC (rev 95)
@@ -1,19 +0,0 @@
-% File src/R/man/removeHandler.Rd
-% $Id$
-
-\name{removeHandler}
-\alias{removeHandler}
-\title{remove a handler from a logger}
-\description{
-
- removes the \var{handler} from the \var{logger}.
-
-}
-\usage{
-removeHandler(handler, logger='')
-}
-\arguments{
- \item{handler}{the name or the action of the handler}
- \item{logger}{the name of the logger to which to attach the new
- handler, defaults to the root logger}
-}
More information about the Logging-commits
mailing list