File: makeSimpleFileLogger.Rd

package info (click to toggle)
r-cran-bbmisc 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,256 kB
  • sloc: ansic: 176; sh: 9; makefile: 5
file content (33 lines) | stat: -rw-r--r-- 1,158 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeSimpleFileLogger.R
\name{makeSimpleFileLogger}
\alias{makeSimpleFileLogger}
\alias{SimpleFileLogger}
\title{Simple logger which outputs to a file}
\usage{
makeSimpleFileLogger(logfile, touch = FALSE, keep = 10L)
}
\arguments{
\item{logfile}{[\code{character(1)}]\cr
File to log to.}

\item{touch}{[\code{logical(1)}]\cr
Should the file be created before the first log message?
Default is \code{FALSE}.}

\item{keep}{[\code{integer(1)}]\cr
Number of log messages to keep in memory for quick access.
Default is \code{10}.}
}
\value{
[\code{\link{SimpleFileLogger}}]. A list with following functions:
  \item{log [function(msg)]}{Send log message.}
  \item{getMessages [function(n)]}{Get last \code{n} log messages.}
  \item{clear [function()]}{Resets logger and deletes log file.}
  \item{getSize [function()]}{Returns the number of logs written.}
  \item{getLogfile [function()]}{Returns the full file name logs are written to.}
}
\description{
Creates a simple file logger closure to log to a file, including time stamps.
An optional buffer holds the last few log messages.
}