R/zzz.R

Defines functions .onLoad

#' @import data.table
#' @import redux
#' @import mlr3misc
#' @import checkmate
#' @importFrom processx process
#' @importFrom uuid UUIDgenerate
#' @importFrom utils str
#' @importFrom jsonlite fromJSON
#' @importFrom parallel nextRNGStream nextRNGSubStream
"_PACKAGE"

.onLoad = function(libname, pkgname) {
  # setup logger
  lg = lgr::get_logger(pkgname)
  assign("lg", lg, envir = parent.env(environment()))
  f = function(event) {
    event$msg = paste0("[rush] ", event$msg)
    TRUE
  }
  lg$set_filters(list(f))
  if (Sys.getenv("IN_PKGDOWN") == "true") {
    lg$set_threshold("warn")
  }
} # nocov end

Try the rush package in your browser

Any scripts or data that you put into this service are public.

rush documentation built on June 22, 2024, 9:38 a.m.