File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ Suggests:
4040 rotor (>= 0.2.2),
4141 RPostgres,
4242 rprojroot,
43+ RPushbullet,
4344 RSQLite,
4445 sendmailR,
4546 testthat,
Original file line number Diff line number Diff line change 33## new features
44 * added ` logger_tree() ` which provides an overview of all registered loggers
55 * added ` print() ` and ` format() ` methods for Appenders
6- * ` AppenderMemory ` : added ` data ` and ` dt ` active fields
6+ * ` AppenderMemory ` : added ` data ` and ` dt ` active fields (which return the
7+ log as a data.frame or data.table)
78
89## API changes
910 * Removed deprecated functions ` FATAL() ` , ` ERROR() ` . Use ` lgr$fatal() ` ,
Original file line number Diff line number Diff line change @@ -419,6 +419,8 @@ AppenderJson <- R6::R6Class(
419419 layout = LayoutJson $ new(),
420420 filters = NULL
421421 ){
422+ assert_namespace(" jsonlite" )
423+
422424 self $ set_file(file )
423425 self $ set_threshold(threshold )
424426 self $ set_layout(layout )
@@ -655,6 +657,7 @@ AppenderDt <- R6::R6Class(
655657 buffer_size = 1e5 ,
656658 filters = NULL
657659 ){
660+ assert_namespace(" data.table" )
658661 assert(is_scalar_integerish(buffer_size ))
659662 assert(
660663 data.table :: is.data.table(prototype ) && is.integer(prototype $ .id ),
@@ -1948,6 +1951,8 @@ AppenderPushbullet <- R6::R6Class(
19481951 apikey = NULL ,
19491952 filters = NULL
19501953 ){
1954+ assert_namespace(" RPushbullet" )
1955+
19511956 private $ initialize_buffer(buffer_size )
19521957 self $ set_flush_on_rotate(FALSE )
19531958 self $ set_flush_on_exit(FALSE )
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ context("print_Appender")
44
55
66test_that(" all Appenders print() without failure" , {
7+ if (
8+ ! requireNamespace(" sendmailR" ) ||
9+ ! requireNamespace(" RPushbullet" ) ||
10+ ! requireNamespace(" rotor" ) ||
11+ ! requireNamespace(" DBI" ) ||
12+ ! requireNamespace(" RSQLite" )
13+ ){
14+ skip(" Required packages not installed" )
15+ }
16+
717 tf <- tempfile()
818 on.exit(unlink(tf ))
919
You can’t perform that action at this time.
0 commit comments