[Logging-commits] r74 - in handlers/pkg: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 27 09:15:30 CEST 2011


Author: mariotomo
Date: 2011-04-27 09:15:29 +0200 (Wed, 27 Apr 2011)
New Revision: 74

Modified:
   handlers/pkg/DESCRIPTION
   handlers/pkg/NAMESPACE
   handlers/pkg/R/sentry.R
   handlers/pkg/man/sentry.Rd
Log:
work in progress


Modified: handlers/pkg/DESCRIPTION
===================================================================
--- handlers/pkg/DESCRIPTION	2011-04-27 07:08:57 UTC (rev 73)
+++ handlers/pkg/DESCRIPTION	2011-04-27 07:15:29 UTC (rev 74)
@@ -6,5 +6,5 @@
 Maintainer: Mario Frasca <mario.frasca at nelen-schuurmans.nl>
 Description: this package defines some useful actions for logging handlers.
 License: GPL (>=2)
-Depends: R (>= 2.12.0), logging.oo
+Depends: R (>= 2.12.0), logging
 Suggests: svUnit, RCurl, Ruuid, rjson
\ No newline at end of file

Modified: handlers/pkg/NAMESPACE
===================================================================
--- handlers/pkg/NAMESPACE	2011-04-27 07:08:57 UTC (rev 73)
+++ handlers/pkg/NAMESPACE	2011-04-27 07:15:29 UTC (rev 74)
@@ -1,3 +1,3 @@
 # $Id: NAMESPACE 61 2011-02-11 11:34:43Z mariotomo $
-export(sentryHandler
+export(sentryAction
        )

Modified: handlers/pkg/R/sentry.R
===================================================================
--- handlers/pkg/R/sentry.R	2011-04-27 07:08:57 UTC (rev 73)
+++ handlers/pkg/R/sentry.R	2011-04-27 07:15:29 UTC (rev 74)
@@ -49,7 +49,7 @@
                message=msg,
                view=deparse(functionCallStack[length(functionCallStack) - 1][[1]]),
                message_id=as.character(getuuid()),
-               logger_name=record$logger
+               logger_name=record$logger,
                metadata=list())
   repr <- as.character(base64(toJSON(data)))
 

Modified: handlers/pkg/man/sentry.Rd
===================================================================
--- handlers/pkg/man/sentry.Rd	2011-04-27 07:08:57 UTC (rev 73)
+++ handlers/pkg/man/sentry.Rd	2011-04-27 07:15:29 UTC (rev 74)
@@ -2,21 +2,22 @@
 % $Id: getLogger.Rd 11 2010-04-03 18:54:20Z mariotomo $
 
 \name{sentry}
-\alias{sentryHandler}
-\title{the `sentryHandler` action function}
+\alias{sentryAction}
+\title{the `sentryAction action function}
 \description{
 
-  the `sentryHandler` function can be registered as action to a
+  the `sentryAction function can be registered as action to a
   handler.  it sends formatted records to a sentry
   server.
 
 }
 \details{
-  the handler environment needs to contain the URL of the sentry server.
+  you do not call this function directly, you register it as action for
+  a handler.  the handler environment needs to contain the URL of the
+  sentry server.
 }
 \usage{
-logger <- Logger$new(name=name)
-logger$addHandler(some_name, sentryHandler, server=some_url)
+sentryAction(msg, conf, record)
 }
 \arguments{
   \item{msg}{the formatted record}
@@ -29,9 +30,8 @@
 
 basicConfig()
 
-log <- Logger$new(name="")
-log$addHandler("sentry", sentryHandler, server="http://sentry.somedomain.com/")
+addHandler("sentry", sentryAction, server="http://sentry.somedomain.com/")
 
-log$debug("not sent, basic is INFO")
-log$warn("sent and timestamped")
+logdebug("not sent, basic is INFO")
+logwarn("sent and timestamped")
 }



More information about the Logging-commits mailing list