Debian Codegraph @

man/LoggerGlue.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/Logger.R
3 \name{LoggerGlue}
4 \alias{LoggerGlue}
5 \title{LoggerGlue}
6 \description{
7 LoggerGlue
8
9 LoggerGlue
10 }
11 \details{
12 \code{LoggerGlue} uses \code{\link[glue:glue]{glue::glue()}} instead of \code{\link[base:sprintf]{base::sprintf()}} to construct
13 log messages. \strong{glue} is a very well designed package for
14 string interpolation. It makes composing log messages
15 more flexible and comfortable at the price of an additional dependency and
16 slightly less performance than \code{sprintf()}.
17
18 \code{glue()} lets you define temporary named variables inside the call.
19 As with the normal Logger, these named arguments get turned into custom
20 fields; however, you can suppress this behaviour by making named argument
21 start with a \code{"."}. Please refer to \code{vignette("lgr", package = "lgr")} for
22 examples.
23 }
24 \section{Super classes}{
25 \code{\link[lgr:Filterable]{lgr::Filterable}} -> \code{\link[lgr:Logger]{lgr::Logger}} -> \code{LoggerGlue}
26 }
27 \section{Methods}{
28 \subsection{Public methods}{
29 \itemize{
30 \item \href{#method-LoggerGlue-new}{\code{LoggerGlue$new()}}
31 \item \href{#method-LoggerGlue-fatal}{\code{LoggerGlue$fatal()}}
32 \item \href{#method-LoggerGlue-error}{\code{LoggerGlue$error()}}
33 \item \href{#method-LoggerGlue-warn}{\code{LoggerGlue$warn()}}
34 \item \href{#method-LoggerGlue-info}{\code{LoggerGlue$info()}}
35 \item \href{#method-LoggerGlue-debug}{\code{LoggerGlue$debug()}}
36 \item \href{#method-LoggerGlue-trace}{\code{LoggerGlue$trace()}}
37 \item \href{#method-LoggerGlue-log}{\code{LoggerGlue$log()}}
38 \item \href{#method-LoggerGlue-list_log}{\code{LoggerGlue$list_log()}}
39 \item \href{#method-LoggerGlue-spawn}{\code{LoggerGlue$spawn()}}
40 \item \href{#method-LoggerGlue-set_transformer}{\code{LoggerGlue$set_transformer()}}
41 }
42 }
43 \if{html}{\out{
44 <details><summary>Inherited methods</summary>
45 <ul>
46 <li><span class="pkg-link" data-pkg="lgr" data-topic="Filterable" data-id="add_filter"><a href='../../lgr/html/Filterable.html#method-Filterable-add_filter'><code>lgr::Filterable$add_filter()</code></a></span></li>
47 <li><span class="pkg-link" data-pkg="lgr" data-topic="Filterable" data-id="filter"><a href='../../lgr/html/Filterable.html#method-Filterable-filter'><code>lgr::Filterable$filter()</code></a></span></li>
48 <li><span class="pkg-link" data-pkg="lgr" data-topic="Filterable" data-id="remove_filter"><a href='../../lgr/html/Filterable.html#method-Filterable-remove_filter'><code>lgr::Filterable$remove_filter()</code></a></span></li>
49 <li><span class="pkg-link" data-pkg="lgr" data-topic="Filterable" data-id="set_filters"><a href='../../lgr/html/Filterable.html#method-Filterable-set_filters'><code>lgr::Filterable$set_filters()</code></a></span></li>
50 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="add_appender"><a href='../../lgr/html/Logger.html#method-Logger-add_appender'><code>lgr::Logger$add_appender()</code></a></span></li>
51 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="config"><a href='../../lgr/html/Logger.html#method-Logger-config'><code>lgr::Logger$config()</code></a></span></li>
52 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="handle_exception"><a href='../../lgr/html/Logger.html#method-Logger-handle_exception'><code>lgr::Logger$handle_exception()</code></a></span></li>
53 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="remove_appender"><a href='../../lgr/html/Logger.html#method-Logger-remove_appender'><code>lgr::Logger$remove_appender()</code></a></span></li>
54 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="set_appenders"><a href='../../lgr/html/Logger.html#method-Logger-set_appenders'><code>lgr::Logger$set_appenders()</code></a></span></li>
55 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="set_exception_handler"><a href='../../lgr/html/Logger.html#method-Logger-set_exception_handler'><code>lgr::Logger$set_exception_handler()</code></a></span></li>
56 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="set_propagate"><a href='../../lgr/html/Logger.html#method-Logger-set_propagate'><code>lgr::Logger$set_propagate()</code></a></span></li>
57 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="set_replace_empty"><a href='../../lgr/html/Logger.html#method-Logger-set_replace_empty'><code>lgr::Logger$set_replace_empty()</code></a></span></li>
58 <li><span class="pkg-link" data-pkg="lgr" data-topic="Logger" data-id="set_threshold"><a href='../../lgr/html/Logger.html#method-Logger-set_threshold'><code>lgr::Logger$set_threshold()</code></a></span></li>
59 </ul>
60 </details>
61 }}
62 \if{html}{\out{<hr>}}
63 \if{html}{\out{<a id="method-LoggerGlue-new"></a>}}
64 \if{latex}{\out{\hypertarget{method-LoggerGlue-new}{}}}
65 \subsection{Method \code{new()}}{
66 \subsection{Usage}{
67 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$new(
68 name = "(unnamed logger)",
69 appenders = list(),
70 threshold = NULL,
71 filters = list(),
72 exception_handler = default_exception_handler,
73 propagate = TRUE,
74 replace_empty = "<NULL>",
75 transformer = NULL
76 )}\if{html}{\out{</div>}}
77 }
78
79 }
80 \if{html}{\out{<hr>}}
81 \if{html}{\out{<a id="method-LoggerGlue-fatal"></a>}}
82 \if{latex}{\out{\hypertarget{method-LoggerGlue-fatal}{}}}
83 \subsection{Method \code{fatal()}}{
84 \subsection{Usage}{
85 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$fatal(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
86 }
87
88 }
89 \if{html}{\out{<hr>}}
90 \if{html}{\out{<a id="method-LoggerGlue-error"></a>}}
91 \if{latex}{\out{\hypertarget{method-LoggerGlue-error}{}}}
92 \subsection{Method \code{error()}}{
93 \subsection{Usage}{
94 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$error(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
95 }
96
97 }
98 \if{html}{\out{<hr>}}
99 \if{html}{\out{<a id="method-LoggerGlue-warn"></a>}}
100 \if{latex}{\out{\hypertarget{method-LoggerGlue-warn}{}}}
101 \subsection{Method \code{warn()}}{
102 \subsection{Usage}{
103 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$warn(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
104 }
105
106 }
107 \if{html}{\out{<hr>}}
108 \if{html}{\out{<a id="method-LoggerGlue-info"></a>}}
109 \if{latex}{\out{\hypertarget{method-LoggerGlue-info}{}}}
110 \subsection{Method \code{info()}}{
111 \subsection{Usage}{
112 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$info(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
113 }
114
115 }
116 \if{html}{\out{<hr>}}
117 \if{html}{\out{<a id="method-LoggerGlue-debug"></a>}}
118 \if{latex}{\out{\hypertarget{method-LoggerGlue-debug}{}}}
119 \subsection{Method \code{debug()}}{
120 \subsection{Usage}{
121 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$debug(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
122 }
123
124 }
125 \if{html}{\out{<hr>}}
126 \if{html}{\out{<a id="method-LoggerGlue-trace"></a>}}
127 \if{latex}{\out{\hypertarget{method-LoggerGlue-trace}{}}}
128 \subsection{Method \code{trace()}}{
129 \subsection{Usage}{
130 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$trace(..., caller = get_caller(-8L), .envir = parent.frame())}\if{html}{\out{</div>}}
131 }
132
133 }
134 \if{html}{\out{<hr>}}
135 \if{html}{\out{<a id="method-LoggerGlue-log"></a>}}
136 \if{latex}{\out{\hypertarget{method-LoggerGlue-log}{}}}
137 \subsection{Method \code{log()}}{
138 \subsection{Usage}{
139 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$log(
140 level,
141 ...,
142 timestamp = Sys.time(),
143 caller = get_caller(-7),
144 .envir = parent.frame()
145 )}\if{html}{\out{</div>}}
146 }
147
148 }
149 \if{html}{\out{<hr>}}
150 \if{html}{\out{<a id="method-LoggerGlue-list_log"></a>}}
151 \if{latex}{\out{\hypertarget{method-LoggerGlue-list_log}{}}}
152 \subsection{Method \code{list_log()}}{
153 \subsection{Usage}{
154 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$list_log(x)}\if{html}{\out{</div>}}
155 }
156
157 }
158 \if{html}{\out{<hr>}}
159 \if{html}{\out{<a id="method-LoggerGlue-spawn"></a>}}
160 \if{latex}{\out{\hypertarget{method-LoggerGlue-spawn}{}}}
161 \subsection{Method \code{spawn()}}{
162 \subsection{Usage}{
163 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$spawn(name)}\if{html}{\out{</div>}}
164 }
165
166 }
167 \if{html}{\out{<hr>}}
168 \if{html}{\out{<a id="method-LoggerGlue-set_transformer"></a>}}
169 \if{latex}{\out{\hypertarget{method-LoggerGlue-set_transformer}{}}}
170 \subsection{Method \code{set_transformer()}}{
171 Set the transformer for glue string interpolation
172 \subsection{Usage}{
173 \if{html}{\out{<div class="r">}}\preformatted{LoggerGlue$set_transformer(x)}\if{html}{\out{</div>}}
174 }
175
176 \subsection{Arguments}{
177 \if{html}{\out{<div class="arguments">}}
178 \describe{
179 \item{\code{x}}{single \link{function} taking two arguments. See \code{\link[glue:glue]{glue::glue()}}.}
180 }
181 \if{html}{\out{</div>}}
182 }
183 }
184 }