Last updated on 2025-12-07 01:48:40 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.5.0 | 16.63 | 76.29 | 92.92 | NOTE | |
| r-devel-linux-x86_64-debian-gcc | 0.5.0 | 11.38 | 50.53 | 61.91 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 0.5.0 | 39.00 | 103.16 | 142.16 | NOTE | |
| r-devel-linux-x86_64-fedora-gcc | 0.5.0 | 37.00 | 115.80 | 152.80 | NOTE | |
| r-devel-windows-x86_64 | 0.5.0 | 17.00 | 102.00 | 119.00 | NOTE | |
| r-patched-linux-x86_64 | 0.5.0 | 18.38 | 65.94 | 84.32 | OK | |
| r-release-linux-x86_64 | 0.5.0 | 15.28 | 65.77 | 81.05 | OK | |
| r-release-macos-arm64 | 0.5.0 | OK | ||||
| r-release-macos-x86_64 | 0.5.0 | 15.00 | 111.00 | 126.00 | OK | |
| r-release-windows-x86_64 | 0.5.0 | 16.00 | 97.00 | 113.00 | OK | |
| r-oldrel-macos-arm64 | 0.5.0 | OK | ||||
| r-oldrel-macos-x86_64 | 0.5.0 | 12.00 | 130.00 | 142.00 | OK | |
| r-oldrel-windows-x86_64 | 0.5.0 | 19.00 | 115.00 | 134.00 | OK |
Version: 0.5.0
Check: HTML version of manual
Result: NOTE
Found the following HTML validation problems:
lgr.html:1742:1 (AppenderFileRotatingTime.Rd:74): Warning: <a> anchor "method-AppenderFileRotating-new" already defined
lgr.html:1784:1 (AppenderFileRotatingTime.Rd:105): Warning: <a> anchor "method-AppenderFileRotating-rotate" already defined
lgr.html:1869:1 (AppenderFileRotatingTime.Rd:158): Warning: <a> anchor "method-AppenderFileRotating-format" already defined
lgr.html:1883:1 (AppenderFileRotatingTime.Rd:167): Warning: <a> anchor "method-AppenderFileRotating-clone" already defined
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Version: 0.5.0
Check: package dependencies
Result: WARN
Cannot process vignettes
Packages suggested but not available for checking:
'covr', 'knitr', 'rmarkdown', 'yaml'
VignetteBuilder package required for checking but not installed: ‘knitr’
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.5.0
Check: examples
Result: ERROR
Running examples in ‘lgr-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Logger
> ### Title: Loggers
> ### Aliases: Logger Loggers
>
> ### ** Examples
>
> # lgr::lgr is the root logger that is always available
> lgr$info("Today is a good day")
INFO [14:51:24.090] Today is a good day
> lgr$fatal("This is a serious error")
FATAL [14:51:24.091] This is a serious error
>
> # Loggers use sprintf() for string formatting by default
> lgr$info("Today is %s", Sys.Date() )
INFO [14:51:24.092] Today is 2025-12-06
>
> # If no unnamed `...` are present, msg is not passed through sprintf()
> lgr$fatal("100% bad") # so this works
FATAL [14:51:24.093] 100% bad
> lgr$fatal("%s%% bad", 100) # if you use unnamed arguments, you must escape %
FATAL [14:51:24.094] 100% bad
>
> # You can create new loggers with get_logger()
> tf <- tempfile()
> lg <- get_logger("mylogger")$set_appenders(AppenderFile$new(tf))
>
> # The new logger passes the log message on to the appenders of its parent
> # logger, which is by default the root logger. This is why the following
> # writes not only the file 'tf', but also to the console.
> lg$fatal("blubb")
FATAL [14:51:24.097] blubb
> readLines(tf)
[1] "FATAL [2025-12-06 14:51:24.097] blubb"
>
> # This logger's print() method depicts this relationship.
> child <- get_logger("lg/child")
> print(child)
<Logger> [info] lg/child
inherited appenders:
console: <AppenderConsole> [all] -> console
> print(child$name)
[1] "lg/child"
>
> # use formatting strings and custom fields
> tf2 <- tempfile()
> lg$add_appender(AppenderFile$new(tf2, layout = LayoutJson$new()))
> lg$info("Not all %s support custom fields", "appenders", type = "test")
INFO [14:51:24.102] Not all appenders support custom fields {type: `test`}
> cat(readLines(tf), sep = "\n")
FATAL [2025-12-06 14:51:24.097] blubb
INFO [2025-12-06 14:51:24.102] Not all appenders support custom fields {"type":"test"}
> cat(readLines(tf2), sep = "\n")
{"level":400,"timestamp":"2025-12-06 14:51:24","logger":"mylogger","caller":"(shell)","msg":"Not all appenders support custom fields","type":"test"}
>
> # cleanup
> unlink(c(tf, tf2))
> lg$config(NULL) # reset logger config
<Logger> [info] mylogger
inherited appenders:
console: <AppenderConsole> [all] -> console
>
> # LoggerGlue
> # You can also create a new logger that uses the awesome glue library for
> # string formatting instead of sprintf
>
> if (requireNamespace("glue")){
+
+ lg <- get_logger_glue("glue")
+ lg$fatal("blah ", "fizz is set to: {fizz}", foo = "bar", fizz = "buzz")
+ # prevent creation of custom fields with prefixing a dot
+ lg$fatal("blah ", "fizz is set to: {.fizz}", foo = "bar", .fizz = "buzz")
+
+ #' # completely reset 'glue' to an unconfigured vanilla Logger
+ get_logger("glue", reset = TRUE)
+
+ }
FATAL [14:51:24.111] blah fizz is set to: buzz {foo: `bar`, fizz: `buzz`}
FATAL [14:51:24.153] blah fizz is set to: buzz {foo: `bar`}
<Logger> [info] glue
inherited appenders:
console: <AppenderConsole> [all] -> console
>
>
> # Configuring a Logger
> lg <- get_logger("test")
> lg$config(NULL) # resets logger to unconfigured state
<Logger> [info] test
inherited appenders:
console: <AppenderConsole> [all] -> console
>
> # With setters
> lg$
+ set_threshold("error")$
+ set_propagate(FALSE)$
+ set_appenders(AppenderConsole$new(threshold = "info"))
>
> lg$config(NULL)
<Logger> [info] test
inherited appenders:
console: <AppenderConsole> [all] -> console
>
> # With a list
> lg$config(list(
+ threshold = "error",
+ propagate = FALSE,
+ appenders = list(AppenderConsole$new(threshold = "info"))
+ ))
<Logger> [error] test
appenders:
[[1]]: <AppenderConsole> [info] -> console
>
> lg$config(NULL) # resets logger to unconfigured state
<Logger> [info] test
inherited appenders:
console: <AppenderConsole> [all] -> console
>
> # Via YAML
> cfg <- "
+ Logger:
+ threshold: error
+ propagate: false
+ appenders:
+ AppenderConsole:
+ threshold: info
+ "
>
> lg$config(cfg)
Error in loadNamespace(x) : there is no package called ‘yaml’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.5.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [12s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(lgr)
>
> test_check("lgr")
Saving _problems/test_Appender-230.R
Saving _problems/test_lgr-package-40.R
[ FAIL 2 | WARN 1 | SKIP 4 | PASS 612 ]
══ Skipped tests (4) ═══════════════════════════════════════════════════════════
• Terminal does not support colors (1): 'test_log_levels.R:58:3'
• {yaml} is not installed (3): 'test_logger_config.R:30:3',
'test_logger_config.R:53:3', 'test_logger_config.R:120:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_Appender.R:213:1'): AppenderConsole: chooses stderr by default when in knitr ──
Error in `loadNamespace(x)`: cyclic namespace dependency detected when loading 'knitr', already loading 'knitr'
── Failure ('test_lgr-package.R:40:3'): get_envar_default_config works as expected ──
Expected `get_envar_default_config()` to be an S3 object.
Actual OO type: none.
[ FAIL 2 | WARN 1 | SKIP 4 | PASS 612 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.5.0
Check: package vignettes
Result: NOTE
Package has ‘vignettes’ subdirectory but apparently no vignettes.
Perhaps the ‘VignetteBuilder’ information is missing from the
DESCRIPTION file?
Flavor: r-devel-linux-x86_64-debian-gcc