Learn R Programming

tryCatchLog (version 1.0.2)

build.log.entry: Creates a log entry row containing all relevant logging information in columns

Description

The serverity level should correspond to the condition class.

Usage

build.log.entry(timestamp, severity, msg.text, call.stack, dump.file.name,
  omit.call.stack.items = 0)

Arguments

timestamp

logging timestamp as POSIXct (normally by calling Sys.time)

severity

severity level of the log entry ((ERROR, WARN, INFO etc.)

msg.text

Logging message (e. g. error message)

call.stack

a call stack created by sys.calls

dump.file.name

name of the created dump file (leave empty if the tryCatchLog argument write.error.dump.file is FALSE

omit.call.stack.items

the number of stack trace items to ignore (= last x calls) in the passed call.stack since they are caused by using tryCatchLog

Value

An object of class tryCatchLog.log.entry and data.frame with one and the following columns:

  1. timestamp - creation date and time of the logging entry

  2. severity - the serverity level of the log entry (ERROR, WARN, INFO etc.)

  3. msg.text - the message text of the log entry

  4. compact.stack.trace - the short stack trace containing only entries with source code references down to line of code that has thrown the condition

  5. full.stack.trace - the full stack trace with all calls down to the line of code that has thrown the condition (including calls to R internal functions and other functions even when the source code in not available).

  6. dump.file.name - name of the created dump file (if any)

See Also

last.tryCatchLog.result build.log.output