Debian Codegraph @

man/AppenderFileRotatingTime.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/Appender.R
3 \name{AppenderFileRotatingTime}
4 \alias{AppenderFileRotatingTime}
5 \title{Log to a time-stamped rotating file}
6 \description{
7 Log to a time-stamped rotating file
8
9 Log to a time-stamped rotating file
10 }
11 \details{
12 An extension of \link{AppenderFile} that rotates logfiles based on certain
13 conditions. Please refer to the documentation of \code{\link[rotor:rotate]{rotor::rotate_time()}} for
14 the meanings of the extra arguments
15 }
16 \seealso{
17 \link{AppenderFileRotatingDate}, \link{AppenderFileRotating}, \code{\link[rotor:rotate]{rotor::rotate()}}
18
19 Other Appenders:
20 \code{\link{Appender}},
21 \code{\link{AppenderBuffer}},
22 \code{\link{AppenderConsole}},
23 \code{\link{AppenderFile}},
24 \code{\link{AppenderFileRotating}},
25 \code{\link{AppenderFileRotatingDate}},
26 \code{\link{AppenderTable}}
27 }
28 \concept{Appenders}
29 \section{Super classes}{
30 \code{\link[lgr:Filterable]{lgr::Filterable}} -> \code{\link[lgr:Appender]{lgr::Appender}} -> \code{\link[lgr:AppenderFile]{lgr::AppenderFile}} -> \code{\link[lgr:AppenderFileRotating]{lgr::AppenderFileRotating}} -> \code{AppenderFileRotatingTime}
31 }
32 \section{Active bindings}{
33 \if{html}{\out{<div class="r6-active-bindings">}}
34 \describe{
35 \item{\code{cache_backups}}{\code{TRUE} or \code{FALSE}. If \code{TRUE} (the default) the list of backups is cached,
36 if \code{FALSE} it is read from disk every time this appender triggers.
37 Caching brings a significant speedup for checking whether to rotate or
38 not based on the \code{age} of the last backup, but is only safe if
39 there are no other programs/functions (except this appender) interacting
40 with the backups.}
41 }
42 \if{html}{\out{</div>}}
43 }
44 \section{Methods}{
45 \subsection{Public methods}{
46 \itemize{
47 \item \href{#method-AppenderFileRotatingTime-new}{\code{AppenderFileRotatingTime$new()}}
48 \item \href{#method-AppenderFileRotatingTime-rotate}{\code{AppenderFileRotatingTime$rotate()}}
49 \item \href{#method-AppenderFileRotatingTime-set_age}{\code{AppenderFileRotatingTime$set_age()}}
50 \item \href{#method-AppenderFileRotatingTime-set_fmt}{\code{AppenderFileRotatingTime$set_fmt()}}
51 \item \href{#method-AppenderFileRotatingTime-set_overwrite}{\code{AppenderFileRotatingTime$set_overwrite()}}
52 \item \href{#method-AppenderFileRotatingTime-set_cache_backups}{\code{AppenderFileRotatingTime$set_cache_backups()}}
53 \item \href{#method-AppenderFileRotatingTime-format}{\code{AppenderFileRotatingTime$format()}}
54 \item \href{#method-AppenderFileRotatingTime-clone}{\code{AppenderFileRotatingTime$clone()}}
55 }
56 }
57 \if{html}{\out{
58 <details><summary>Inherited methods</summary>
59 <ul>
60 <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>
61 <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>
62 <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>
63 <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>
64 <li><span class="pkg-link" data-pkg="lgr" data-topic="Appender" data-id="set_layout"><a href='../../lgr/html/Appender.html#method-Appender-set_layout'><code>lgr::Appender$set_layout()</code></a></span></li>
65 <li><span class="pkg-link" data-pkg="lgr" data-topic="Appender" data-id="set_threshold"><a href='../../lgr/html/Appender.html#method-Appender-set_threshold'><code>lgr::Appender$set_threshold()</code></a></span></li>
66 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFile" data-id="show"><a href='../../lgr/html/AppenderFile.html#method-AppenderFile-show'><code>lgr::AppenderFile$show()</code></a></span></li>
67 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="append"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-append'><code>lgr::AppenderFileRotating$append()</code></a></span></li>
68 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="prune"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-prune'><code>lgr::AppenderFileRotating$prune()</code></a></span></li>
69 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_backup_dir"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_backup_dir'><code>lgr::AppenderFileRotating$set_backup_dir()</code></a></span></li>
70 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_compression"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_compression'><code>lgr::AppenderFileRotating$set_compression()</code></a></span></li>
71 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_create_file"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_create_file'><code>lgr::AppenderFileRotating$set_create_file()</code></a></span></li>
72 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_file"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_file'><code>lgr::AppenderFileRotating$set_file()</code></a></span></li>
73 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_max_backups"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_max_backups'><code>lgr::AppenderFileRotating$set_max_backups()</code></a></span></li>
74 <li><span class="pkg-link" data-pkg="lgr" data-topic="AppenderFileRotating" data-id="set_size"><a href='../../lgr/html/AppenderFileRotating.html#method-AppenderFileRotating-set_size'><code>lgr::AppenderFileRotating$set_size()</code></a></span></li>
75 </ul>
76 </details>
77 }}
78 \if{html}{\out{<hr>}}
79 \if{html}{\out{<a id="method-AppenderFileRotatingTime-new"></a>}}
80 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-new}{}}}
81 \subsection{Method \code{new()}}{
82 \subsection{Usage}{
83 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$new(
84 file,
85 threshold = NA_integer_,
86 layout = LayoutFormat$new(),
87 filters = NULL,
88 age = Inf,
89 size = -1,
90 max_backups = Inf,
91 compression = FALSE,
92 backup_dir = dirname(file),
93 fmt = "\%Y-\%m-\%d--\%H-\%M-\%S",
94 overwrite = FALSE,
95 cache_backups = TRUE,
96 create_file = NULL
97 )}\if{html}{\out{</div>}}
98 }
99
100 \subsection{Arguments}{
101 \if{html}{\out{<div class="arguments">}}
102 \describe{
103 \item{\code{size, age, max_backups, compression, backup_dir, fmt, overwrite, cache_backups}}{see \code{\link[rotor:rotate]{rotor::rotate_time()}} for the meaning of these arguments. Note that
104 \code{fmt} corresponds to \code{format} and \code{backup_dir} to \code{dir}.}
105 }
106 \if{html}{\out{</div>}}
107 }
108 }
109 \if{html}{\out{<hr>}}
110 \if{html}{\out{<a id="method-AppenderFileRotatingTime-rotate"></a>}}
111 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-rotate}{}}}
112 \subsection{Method \code{rotate()}}{
113 \subsection{Usage}{
114 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$rotate(force = FALSE, now = Sys.time())}\if{html}{\out{</div>}}
115 }
116
117 }
118 \if{html}{\out{<hr>}}
119 \if{html}{\out{<a id="method-AppenderFileRotatingTime-set_age"></a>}}
120 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-set_age}{}}}
121 \subsection{Method \code{set_age()}}{
122 \subsection{Usage}{
123 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$set_age(x)}\if{html}{\out{</div>}}
124 }
125
126 }
127 \if{html}{\out{<hr>}}
128 \if{html}{\out{<a id="method-AppenderFileRotatingTime-set_fmt"></a>}}
129 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-set_fmt}{}}}
130 \subsection{Method \code{set_fmt()}}{
131 \subsection{Usage}{
132 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$set_fmt(x)}\if{html}{\out{</div>}}
133 }
134
135 }
136 \if{html}{\out{<hr>}}
137 \if{html}{\out{<a id="method-AppenderFileRotatingTime-set_overwrite"></a>}}
138 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-set_overwrite}{}}}
139 \subsection{Method \code{set_overwrite()}}{
140 \subsection{Usage}{
141 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$set_overwrite(x)}\if{html}{\out{</div>}}
142 }
143
144 }
145 \if{html}{\out{<hr>}}
146 \if{html}{\out{<a id="method-AppenderFileRotatingTime-set_cache_backups"></a>}}
147 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-set_cache_backups}{}}}
148 \subsection{Method \code{set_cache_backups()}}{
149 set the \code{cache_backups} flag.
150 \subsection{Usage}{
151 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$set_cache_backups(x)}\if{html}{\out{</div>}}
152 }
153
154 \subsection{Arguments}{
155 \if{html}{\out{<div class="arguments">}}
156 \describe{
157 \item{\code{x}}{a \code{logical} scalar}
158 }
159 \if{html}{\out{</div>}}
160 }
161 }
162 \if{html}{\out{<hr>}}
163 \if{html}{\out{<a id="method-AppenderFileRotatingTime-format"></a>}}
164 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-format}{}}}
165 \subsection{Method \code{format()}}{
166 \subsection{Usage}{
167 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$format(color = FALSE, ...)}\if{html}{\out{</div>}}
168 }
169
170 }
171 \if{html}{\out{<hr>}}
172 \if{html}{\out{<a id="method-AppenderFileRotatingTime-clone"></a>}}
173 \if{latex}{\out{\hypertarget{method-AppenderFileRotatingTime-clone}{}}}
174 \subsection{Method \code{clone()}}{
175 The objects of this class are cloneable with this method.
176 \subsection{Usage}{
177 \if{html}{\out{<div class="r">}}\preformatted{AppenderFileRotatingTime$clone(deep = FALSE)}\if{html}{\out{</div>}}
178 }
179
180 \subsection{Arguments}{
181 \if{html}{\out{<div class="arguments">}}
182 \describe{
183 \item{\code{deep}}{Whether to make a deep clone.}
184 }
185 \if{html}{\out{</div>}}
186 }
187 }
188 }