Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeSimpleFileLogger

Simple logger which outputs to a file.


Description

Creates a simple file logger closure to log to a file, including time stamps. An optional buffer holds the last few log messages.

Usage

makeSimpleFileLogger(logfile, touch = FALSE, keep = 10L)

Arguments

logfile

[character(1)]
File to log to.

touch

[logical(1)]
Should the file be created before the first log message? Default is FALSE.

keep

[integer(1)]
Number of log messages to keep in memory for quick access. Default is 10.

Value

[SimpleFileLogger]. A list with following functions:

log [function(msg)]

Send log message.

getMessages [function(n)]

Get last n log messages.

clear [function()]

Resets logger and deletes log file.

getSize [function()]

Returns the number of logs written.

getLogfile [function()]

Returns the full file name logs are written to.


BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.