build.log.output {tryCatchLog} | R Documentation |
Creates a single string suited as logging output
Description
To view the formatted output print the logging output in a console use cat
(instead of printing the output with print
which shows the newline escape codes).
Usage
build.log.output(
log.results,
include.full.call.stack = getOption("tryCatchLog.include.full.call.stack", TRUE),
include.compact.call.stack = getOption("tryCatchLog.include.compact.call.stack",
TRUE),
include.severity = TRUE,
include.timestamp = FALSE,
use.platform.newline = FALSE
)
Arguments
log.results |
A data.frame and member of the class tryCatchLog.log.entry
with log entry rows as returned by last.tryCatchLog.result
containing the logging information to be prepared for the logging output.
|
include.full.call.stack |
Flag of type logical :
Shall the full call stack be included in the log output? Since the full
call stack may be very long and the compact call stack has enough details
normally the full call stack can be omitted by passing FALSE .
|
include.compact.call.stack |
Flag of type logical :
Shall the compact call stack (including only calls with source code references)
be included in the log output? Note: If you ommit both the full and compact
call stacks the message text will be output without call stacks.
|
include.severity |
logical switch if the severity level (e. g. ERROR) shall be
included in the output
|
include.timestamp |
logical switch if the timestamp of the catched condition shall be
included in the output
|
use.platform.newline |
logical : If TRUE the line breaks ("newline") will be
inserted according to the current operationg system (Windows: CR+LF,
else: CR). If FALSE R's usual \n esacpe character will be inserted
and it is left to the client to convert this later into the operation-system-specific
characters. This argument is rarely required (except e. g. if you want to
write the return value into a database table column on Windows).
|
Value
A ready to use logging output with stack trace
(as character
)
Note
The logged call stack details (compact, full or both) can be configured globally
using the options tryCatchLog.include.full.call.stack
and tryCatchLog.include.compact.call.stack
.
The result of the package internal function build.log.entry
can be passed as log.results
argument.
See Also
last.tryCatchLog.result
build.log.entry
[Package
tryCatchLog version 1.3.1
Index]