Commit 536bc50
authored
fix logger error
`glue` fails when receives a vector of length > 1. Message generate with
warning could have n-elements and `parse_logger_message` would return a
vector instead of a single character.
Example
```r
teal.logger::register_logger("teal.code")
teal.logger::register_handlers("teal.code")
teal.code::qenv() |>
within(a <- 1) |>
teal.code::get_var("a")
# Error in h(simpleError(msg, call)) :
# `glue` failed in `formatter_glue` on:
#
# Named chr [1:2] "`get_var()` was deprecated in teal.code 0.5.1." "Please use `base::get()` instead."
# - attr(*, "names")= chr [1:2] "" "i"
#
# Raw error message:
#
# All unnamed arguments must be length 1
#
# Please consider using another `log_formatter` or `skip_formatter` on strings with curly braces.
```All unnamed arguments must be length 1. (#103)1 parent 1838b74 commit 536bc50
File tree
2 files changed
+12
-6
lines changed- R
- tests/testthat
2 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | | - | |
9 | | - | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
0 commit comments