[Logging-commits] r62 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Feb 24 08:41:10 CET 2011
Author: mariotomo
Date: 2011-02-24 08:41:10 +0100 (Thu, 24 Feb 2011)
New Revision: 62
Added:
pkg/man/Logger.Rd
Modified:
pkg/DESCRIPTION
pkg/R/methods.R
Log:
forgot to add the documentation for `Logger`.
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2011-02-11 11:34:43 UTC (rev 61)
+++ pkg/DESCRIPTION 2011-02-24 07:41:10 UTC (rev 62)
@@ -1,5 +1,5 @@
Package: logging
-Version: 0.5-0
+Version: 0.5-62
Date: 2010-06-17
Title: a tentative logging package
Author: Mario Frasca <mariotomo at gmail.com>
Modified: pkg/R/methods.R
===================================================================
--- pkg/R/methods.R 2011-02-11 11:34:43 UTC (rev 61)
+++ pkg/R/methods.R 2011-02-24 07:41:10 UTC (rev 62)
@@ -27,14 +27,18 @@
##
Logger <- setRefClass("Logger",
- fields=list(name = "character"),
+ fields=list(
+ name = "character"),
methods=list(
log = function(...) { levellog(..., logger=name) },
+
+ setLevel = function(newLevel) { logging::setLevel(newLevel, container=name) },
+ addHandler = function(...) { logging::addHandler(..., logger=name) },
+
finest = function(...) { log(loglevels['FINEST'], ...) },
finer = function(...) { log(loglevels['FINER'], ...) },
fine = function(...) { log(loglevels['FINE'], ...) },
debug = function(...) { log(loglevels['DEBUG'], ...) },
info = function(...) { log(loglevels["INFO"], ...) },
warn = function(...) { log(loglevels["WARN"], ...) },
- error = function(...) { log(loglevels["ERROR"], ...) }
- ))
+ error = function(...) { log(loglevels["ERROR"], ...) }))
Added: pkg/man/Logger.Rd
===================================================================
--- pkg/man/Logger.Rd (rev 0)
+++ pkg/man/Logger.Rd 2011-02-24 07:41:10 UTC (rev 62)
@@ -0,0 +1,26 @@
+% File src/R/man/getLogger.Rd
+% $Id: getLogger.Rd 11 2010-04-03 18:54:20Z mariotomo $
+
+\name{Logger}
+\alias{Logger}
+\title{the `Logger` reference class}
+\description{
+
+ Logger is a quick and dirty adoption of the reference class paradigm.
+
+}
+\usage{
+logger <- Logger$new(name=name)
+}
+\arguments{
+ \item{name}{the name of the logger}
+}
+\examples{
+library(logging)
+basicConfig()
+
+log <- Logger$new(name="")
+
+log$debug("not shown, basic is INFO")
+log$warn("shown and timestamped")
+}
\ No newline at end of file
Property changes on: pkg/man/Logger.Rd
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Logging-commits
mailing list