Description Usage Arguments Details Examples
Functions for creating a logger object and manipulating the pertaining log file.
1 2 3 4 5 6 7 | logger.write(file, type, msg)
logger.read(file)
logger.truncate(file)
logger.create(path, suffix, prefix = "log_")
|
file |
A character string with the path to a log file. |
type |
. |
msg |
. |
path |
must exits. |
suffix |
. |
prefix |
. |
M = MESSAGE etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
logger.path <- "...path to log directory..."
logger.suffix <- format(Sys.Date(), "%Y%m%d")
# Create logger object
logger <- logger.create(logger.path, logger.suffix)
# Log file
logger()$file
# Write to log
logger()$write("MESSAGE", "This is a test message")
logger()$write("WARNING", "This is a test warning")
logger()$write("ERROR", "This is a test error")
# Read log
logger()$read()
# Truncate log
logger()$truncate()
logger()$read()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.