Debian Codegraph @

man/print.Logger.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/Logger.R
3 \name{print.Logger}
4 \alias{print.Logger}
5 \alias{format.Logger}
6 \alias{print.ancestry}
7 \alias{format.ancestry}
8 \title{Print a Logger Object}
9 \usage{
10 \method{print}{Logger}(x, color = requireNamespace("crayon", quietly = TRUE), ...)
11
12 \method{format}{Logger}(x, color = FALSE, ...)
13
14 \method{print}{ancestry}(x, color = requireNamespace("crayon", quietly = TRUE), ...)
15
16 \method{format}{ancestry}(x, color = FALSE, ...)
17 }
18 \arguments{
19 \item{x}{any \R Object}
20
21 \item{color}{\code{TRUE} or \code{FALSE}: Output with color? Requires the Package
22 \strong{crayon}}
23
24 \item{...}{ignored}
25 }
26 \value{
27 \code{print()} returns \code{x} (invisibly), \code{format()} returns a \code{character} vector.
28 }
29 \description{
30 The \code{print()} method for Loggers displays the most important aspects of
31 the Logger.
32
33 You can also print just the \code{ancestry} of a Logger which can be accessed with
34 with \code{logger$ancestry()}. This returns a named \code{character} vector whose
35 names correspond to the names of the Loggers \code{logger} inherits from. The
36 \code{TRUE}/\code{FALSE} status of its elements correspond to the \code{propagate} values of
37 these Loggers.
38 }
39 \examples{
40 # print most important details of logger
41 print(lgr)
42 # print only the ancestry of a logger
43 lg <- get_logger("AegonV/Aerys/Rheagar/Aegon")
44 get_logger("AegonV/Aerys/Rheagar")$set_propagate(FALSE)
45
46 print(lg$ancestry)
47 unclass(lg$ancestry)
48 }