ulog: System logging functions

Description Usage Arguments Details Value Author(s) Examples

View source: R/ulog.R

Description

ulog sends output to a system log or ulog daemon.

ulog.init defines where all logging will be directed to.

Usage

1
2
ulog(...)
ulog.init(path = NULL, application = NULL)

Arguments

path

string, path to the unix socked of the logging daemon or specification of the form either "udp://host[:port]" or "tcp://host[:port]" for a remote connection. If NULL is passed the path setting is not changed.

application

string, name of the application that will be reported to the system or NULL to not change that setting.

...

any content to send to the log service - it is used as paste(..., sep="", collapse="\n")

Details

ulog provides a way to perform logging without cluttering the console or stdout/stderr. It also allows multi-process and parallel logging as each log message is transmitted independently and en-bloc. Also it allow multi-user logging with access control.

Although any syslog damon can be used, a minimalistic implementation of the daemon is included in the sources in src/ulogd.

Note that all logging is silent and will not fail even if the receiving side doesnt' exist. This allows unconditional use of ulog().

This package has been forked from Rserve which has used ulog internally.

Value

ulog returns the logged string invisibly

ulog.init returns the current logging path, thus ulog.init() can be used to query the current setting without changing anything.

Author(s)

Simon Urbanek

Examples

1
2
ulog.init("/var/run/syslogd", "R")
ulog("a message from R")

s-u/ulog documentation built on March 26, 2021, 7:17 a.m.

Related to ulog in s-u/ulog...