R/logger.R

Defines functions log_it

#' @import futile.logger
#' @import crayon
NULL
#' @keywords internal
log_it = function(string, state) {
    if (state=='error') {
        futile.logger::flog.error(crayon::red(string))
    } else if (state=='info') {
        futile.logger::flog.info(crayon::blue(string))
    } else if (state=='success') {
        futile.logger::flog.info(crayon::green(string))
    }
}
lecardozo/rworker documentation built on May 12, 2021, 5:37 p.m.