R/logging.R

Defines functions collapse_text cat_prefix_err cat_prefix_warn cat_prefix_info

cat_prefix_info = function(x) format(Sys.time(), "[%Y-%m-%d %H:%M:%S | INFO] ")
cat_prefix_warn = function(x) format(Sys.time(), "[%Y-%m-%d %H:%M:%S | WARN] ")
cat_prefix_err  = function(x) format(Sys.time(), "[%Y-%m-%d %H:%M:%S | ERROR] ")
collapse_text = function(x, sep = ", ") paste(x, collapse = sep)

GetoptLong::qq.options("cat_prefix" = cat_prefix_info, "cat_strwrap" = FALSE)
ShixiangWang/coco documentation built on July 9, 2022, 4:43 a.m.