Learn R Programming

lgr (version 0.3.4)

logger_tree: Logger Tree

Description

Displays a tree structure of all registered Loggers.

Usage

logger_tree()

Arguments

Value

data.frame with subclass "logger_tree"

Symbology

  • unconfigured Loggers are displayed in gray (if your terminal supports colors and you have the package crayon installed).

  • If a logger's threshold is set, it is displayed in square brackets next to its name (reminder: if the threshold is not set, it is inherited from next logger up the logger tree).

  • If a logger's propagate field is set to FALSE an red hash (#) sign is displayed in front of the logger name, to imply that it does not pass LogEvents up the tree.

Examples

Run this code
# NOT RUN {
get_logger("fancymodel")
get_logger("fancymodel/shiny")$
  set_propagate(FALSE)

get_logger("fancymodel/shiny/ui")$
  set_appenders(AppenderConsole$new())

get_logger("fancymodel/shiny/server")$
  set_appenders(list(AppenderConsole$new(), AppenderConsole$new()))$
  set_threshold("trace")

get_logger("fancymodel/plumber")

if (requireNamespace("cli")){
  print(logger_tree())
}

# }

Run the code above in your browser using DataLab