[Logging-commits] r75 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 27 09:22:13 CEST 2011
Author: mariotomo
Date: 2011-04-27 09:22:02 +0200 (Wed, 27 Apr 2011)
New Revision: 75
Modified:
pkg/R/logger.R
pkg/man/handler-actions.Rd
Log:
work in progress
Modified: pkg/R/logger.R
===================================================================
--- pkg/R/logger.R 2011-04-27 07:15:29 UTC (rev 74)
+++ pkg/R/logger.R 2011-04-27 07:22:02 UTC (rev 75)
@@ -59,7 +59,7 @@
if (record$level >= with(handler, level)) {
action <- with(handler, action)
formatter <- with(handler, formatter)
- action(formatter(record), handler)
+ action(formatter(record), handler, record)
}
if(logger != '') {
@@ -216,12 +216,12 @@
## with level equal or higher than that are taken into account), an
## action (writing the formatted record to a stream).
-writeToConsole <- function(msg, handler)
+writeToConsole <- function(msg, handler, ...)
{
cat(paste(msg, '\n', sep=''))
}
-writeToFile <- function(msg, handler)
+writeToFile <- function(msg, handler, ...)
{
if (!exists('file', envir=handler))
stop("handler with writeToFile 'action' must have a 'file' element.\n")
Modified: pkg/man/handler-actions.Rd
===================================================================
--- pkg/man/handler-actions.Rd 2011-04-27 07:15:29 UTC (rev 74)
+++ pkg/man/handler-actions.Rd 2011-04-27 07:22:02 UTC (rev 75)
@@ -14,12 +14,13 @@
}
\usage{
-writeToFile(msg, handler)
-writeToConsole(msg, handler)
+writeToFile(msg, handler, ...)
+writeToConsole(msg, handler, ...)
}
\arguments{
\item{msg}{the final formatted message to be output}
\item{handler}{the handler owning this action}
+ \item{...}{placeholder: accept any extra future parameter.}
}
\details{
More information about the Logging-commits
mailing list