Skip to content

Commit c414b0e

Browse files
committed
Deploying to gh-pages from @ 5d9c34c 🚀
1 parent f6547c0 commit c414b0e

81 files changed

Lines changed: 398 additions & 390 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE-text.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/lgr.html

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/lgr.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ tf <- tempfile(fileext = ".info")
4646
lgr$add_appender(AppenderFile$new(tf), name = "file")
4747
lgr$info("You must think I am joking")
4848
readLines(tf)
49-
#> [1] "INFO [2026-01-30 11:27:48.131] You must think I am joking"
49+
#> [1] "INFO [2026-01-30 11:47:42.001] You must think I am joking"
5050
```
5151

5252
The various Appenders available in lgr are R6 classes. To instantiate an
@@ -63,8 +63,8 @@ exactly one:
6363
lgr$appenders$file$set_layout(LayoutFormat$new(timestamp_fmt = "%B %d %T"))
6464
lgr$info("No, I am quite serious")
6565
readLines(tf)
66-
#> [1] "INFO [2026-01-30 11:27:48.131] You must think I am joking"
67-
#> [2] "INFO [January 30 11:27:48] No, I am quite serious"
66+
#> [1] "INFO [2026-01-30 11:47:42.001] You must think I am joking"
67+
#> [2] "INFO [January 30 11:47:42] No, I am quite serious"
6868

6969
#cleanup
7070
unlink(tf)
@@ -89,15 +89,15 @@ JSON is still somewhat human readable
8989

9090
``` r
9191
cat(readLines(tf))
92-
#> {"level":400,"timestamp":"2026-01-30 11:27:48","logger":"root","caller":"eval","msg":"We lived in Styria"}
92+
#> {"level":400,"timestamp":"2026-01-30 11:47:42","logger":"root","caller":"eval","msg":"We lived in Styria"}
9393
```
9494

9595
and easy for machines to parse
9696

9797
``` r
9898
read_json_lines(tf)
9999
#> level timestamp logger caller msg
100-
#> 1 400 2026-01-30 11:27:48 root eval We lived in Styria
100+
#> 1 400 2026-01-30 11:47:42 root eval We lived in Styria
101101
```
102102

103103
Many Appenders provide either a `$show()` method and a `$data` active
@@ -108,13 +108,13 @@ binding convenience, and so you do not have to call
108108
# show is a method and takes some extra arguments, like maximum number of lines
109109
# to show
110110
lgr$appenders$json$show()
111-
#> {"level":400,"timestamp":"2026-01-30 11:27:48","logger":"root","caller":"eval","msg":"We lived in Styria"}
111+
#> {"level":400,"timestamp":"2026-01-30 11:47:42","logger":"root","caller":"eval","msg":"We lived in Styria"}
112112

113113
# $data always returns a data.frame if available. It is an active binding
114114
# rather than a method, so no extra arguments are possible
115115
lgr$appenders$json$data
116116
#> level timestamp logger caller msg
117-
#> 1 400 2026-01-30 11:27:48 root eval We lived in Styria
117+
#> 1 400 2026-01-30 11:47:42 root eval We lived in Styria
118118
```
119119

120120
Please note that under the hood, `AppenderJson` is just an
@@ -135,8 +135,8 @@ lgr$info("Styria has", poultry = c("capons", "turkeys"))
135135
# JSON can store most R objects quite naturally
136136
read_json_lines(tf)
137137
#> level timestamp logger caller msg poultry
138-
#> 1 400 2026-01-30 11:27:48 root eval We lived in Styria NULL
139-
#> 2 400 2026-01-30 11:27:48 root eval Styria has capons, turkeys
138+
#> 1 400 2026-01-30 11:47:42 root eval We lived in Styria NULL
139+
#> 2 400 2026-01-30 11:47:42 root eval Styria has capons, turkeys
140140
read_json_lines(tf)$poultry[[2]] # works because poultry is a list column
141141
#> [1] "capons" "turkeys"
142142
```
@@ -269,13 +269,13 @@ last event produced by a Logger is stored in its `last_event` field.
269269
``` r
270270
lgr$info("Vampire stories are generally located in Styria")
271271
lgr$last_event # a summary output of the event
272-
#> INFO [2026-01-30 11:27:48] Vampire stories are generally located in Styria
272+
#> INFO [2026-01-30 11:47:42] Vampire stories are generally located in Styria
273273
lgr$last_event$values # all values stored in the event as a list
274274
#> $level
275275
#> [1] 400
276276
#>
277277
#> $timestamp
278-
#> [1] "2026-01-30 11:27:48 UTC"
278+
#> [1] "2026-01-30 11:47:42 UTC"
279279
#>
280280
#> $logger
281281
#> [1] "root"
@@ -311,7 +311,7 @@ lgr$add_appender(AppenderJson$new(tf), "json")
311311
lgr$info("Processing track", file = "track.gpx", waypoints = 32)
312312
lgr$appenders$json$data
313313
#> level timestamp logger caller msg file waypoints
314-
#> 1 400 2026-01-30 11:27:48 root eval Processing track track.gpx 32
314+
#> 1 400 2026-01-30 11:47:42 root eval Processing track track.gpx 32
315315
```
316316

317317
### Thresholds & Filters: controlling output detail
@@ -366,8 +366,8 @@ lgr$info("Another informational message")
366366
lgr$debug("A debug message not shown by the console appender")
367367

368368
readLines(tf)
369-
#> [1] "INFO [2026-01-30 11:27:49.177] Another informational message"
370-
#> [2] "DEBUG [2026-01-30 11:27:49.179] A debug message not shown by the console appender"
369+
#> [1] "INFO [2026-01-30 11:47:43.060] Another informational message"
370+
#> [2] "DEBUG [2026-01-30 11:47:43.062] A debug message not shown by the console appender"
371371

372372
# Remove the appender again
373373
lgr$remove_appender("file")
@@ -612,9 +612,9 @@ read_json_lines(tf)
612612
```
613613

614614
#> level timestamp logger caller msg field numbers use
615-
#> 1 400 2026-01-30 11:27:49 test eval JSON naturally custom NULL <NA>
616-
#> 2 400 2026-01-30 11:27:49 test eval supports custom <NA> 1, 2, 3 <NA>
617-
#> 3 400 2026-01-30 11:27:49 test eval log fields <NA> NULL JSON
615+
#> 1 400 2026-01-30 11:47:43 test eval JSON naturally custom NULL <NA>
616+
#> 2 400 2026-01-30 11:47:43 test eval supports custom <NA> 1, 2, 3 <NA>
617+
#> 3 400 2026-01-30 11:47:43 test eval log fields <NA> NULL JSON
618618

619619
JSON is also human readable, though this vignette does not transport
620620
that fact very well because of the lack of horizontal space.
@@ -625,9 +625,9 @@ lg$appenders$json$show()
625625
cat(readLines(tf), sep = "\n")
626626
```
627627

628-
#> {"level":400,"timestamp":"2026-01-30 11:27:49","logger":"test","caller":"eval","msg":"JSON naturally ","field":"custom"}
629-
#> {"level":400,"timestamp":"2026-01-30 11:27:49","logger":"test","caller":"eval","msg":"supports custom","numbers":[1,2,3]}
630-
#> {"level":400,"timestamp":"2026-01-30 11:27:49","logger":"test","caller":"eval","msg":"log fields","use":"JSON"}
628+
#> {"level":400,"timestamp":"2026-01-30 11:47:43","logger":"test","caller":"eval","msg":"JSON naturally ","field":"custom"}
629+
#> {"level":400,"timestamp":"2026-01-30 11:47:43","logger":"test","caller":"eval","msg":"supports custom","numbers":[1,2,3]}
630+
#> {"level":400,"timestamp":"2026-01-30 11:47:43","logger":"test","caller":"eval","msg":"log fields","use":"JSON"}
631631

632632
``` r
633633
# cleanup
@@ -663,17 +663,17 @@ for (i in 1:100) lg$info(paste(LETTERS, sep = "-"))
663663
# display info on the backups of tf
664664
lg$appenders$rotating$backups
665665
#> path name sfx ext size isdir
666-
#> 1 /tmp/RtmpDPfMuU/file1fa31f7cc0ae.1.log file1fa31f7cc0ae 1 log 10608 FALSE
667-
#> 2 /tmp/RtmpDPfMuU/file1fa31f7cc0ae.2.log file1fa31f7cc0ae 2 log 10608 FALSE
668-
#> 3 /tmp/RtmpDPfMuU/file1fa31f7cc0ae.3.log file1fa31f7cc0ae 3 log 10608 FALSE
669-
#> 4 /tmp/RtmpDPfMuU/file1fa31f7cc0ae.4.log file1fa31f7cc0ae 4 log 10608 FALSE
670-
#> 5 /tmp/RtmpDPfMuU/file1fa31f7cc0ae.5.log file1fa31f7cc0ae 5 log 10608 FALSE
666+
#> 1 /tmp/RtmpgGWvJo/file1f104b166096.1.log file1f104b166096 1 log 10608 FALSE
667+
#> 2 /tmp/RtmpgGWvJo/file1f104b166096.2.log file1f104b166096 2 log 10608 FALSE
668+
#> 3 /tmp/RtmpgGWvJo/file1f104b166096.3.log file1f104b166096 3 log 10608 FALSE
669+
#> 4 /tmp/RtmpgGWvJo/file1f104b166096.4.log file1f104b166096 4 log 10608 FALSE
670+
#> 5 /tmp/RtmpgGWvJo/file1f104b166096.5.log file1f104b166096 5 log 10608 FALSE
671671
#> mode mtime ctime atime uid gid
672-
#> 1 644 2026-01-30 11:27:50 2026-01-30 11:27:50 2026-01-30 11:27:50 1001 1001
673-
#> 2 644 2026-01-30 11:27:50 2026-01-30 11:27:50 2026-01-30 11:27:50 1001 1001
674-
#> 3 644 2026-01-30 11:27:50 2026-01-30 11:27:50 2026-01-30 11:27:50 1001 1001
675-
#> 4 644 2026-01-30 11:27:50 2026-01-30 11:27:50 2026-01-30 11:27:50 1001 1001
676-
#> 5 644 2026-01-30 11:27:50 2026-01-30 11:27:50 2026-01-30 11:27:50 1001 1001
672+
#> 1 644 2026-01-30 11:47:44 2026-01-30 11:47:44 2026-01-30 11:47:44 1001 1001
673+
#> 2 644 2026-01-30 11:47:44 2026-01-30 11:47:44 2026-01-30 11:47:44 1001 1001
674+
#> 3 644 2026-01-30 11:47:44 2026-01-30 11:47:44 2026-01-30 11:47:44 1001 1001
675+
#> 4 644 2026-01-30 11:47:44 2026-01-30 11:47:44 2026-01-30 11:47:44 1001 1001
676+
#> 5 644 2026-01-30 11:47:44 2026-01-30 11:47:44 2026-01-30 11:47:44 1001 1001
677677
#> uname grname index
678678
#> 1 runner runner 1
679679
#> 2 runner runner 2
@@ -714,7 +714,7 @@ print(lg)
714714
#> <Logger> [all] mypackage
715715
#>
716716
#> appenders:
717-
#> [[1]]: <AppenderFile> [all] -> /tmp/RtmpDPfMuU/file1fa3789c29c2
717+
#> [[1]]: <AppenderFile> [all] -> /tmp/RtmpgGWvJo/file1f104b9d2fe6
718718
#>
719719
#> inherited appenders:
720720
#> console: <AppenderConsole> [info] -> console
@@ -748,7 +748,7 @@ print(lg)
748748
#> <Logger> [all] mypackage
749749
#>
750750
#> appenders:
751-
#> [[1]]: <AppenderFile> [all] -> /tmp/RtmpDPfMuU/file1fa3789c29c2
751+
#> [[1]]: <AppenderFile> [all] -> /tmp/RtmpgGWvJo/file1f104b9d2fe6
752752
```
753753

754754
Consequently, `lg` no longer outputs log messages to he console

authors.html

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

authors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Source:
1111
[`DESCRIPTION`](https://github.com/s-fleck/lgr/blob/master/DESCRIPTION)
1212

1313
Fleck S (2026). *lgr: A Fully Featured Logging Framework*. R package
14-
version 0.5.1, <https://s-fleck.github.io/lgr/>.
14+
version 0.5.2, <https://s-fleck.github.io/lgr/>.
1515

1616
@Manual{,
1717
title = {lgr: A Fully Featured Logging Framework},
1818
author = {Stefan Fleck},
1919
year = {2026},
20-
note = {R package version 0.5.1},
20+
note = {R package version 0.5.2},
2121
url = {https://s-fleck.github.io/lgr/},
2222
}

index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

news/index.html

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)