diff --git a/DESCRIPTION b/DESCRIPTION index 8d3e65271..9fb313038 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,6 @@ Imports: DT (>= 0.13), forcats (>= 1.0.0), grid, - logger (>= 0.3.0), scales, shinyjs, shinyTree (>= 0.2.8), @@ -45,7 +44,7 @@ Imports: stringr (>= 1.4.1), teal.code (>= 0.5.0), teal.data (>= 0.5.0), - teal.logger (>= 0.1.3.9013), + teal.logger (>= 0.2.0.9004), teal.reporter (>= 0.3.0), teal.widgets (>= 0.4.0), tern (>= 0.9.3), @@ -65,6 +64,7 @@ Suggests: htmlwidgets, jsonlite, knitr (>= 1.42), + logger (>= 0.2.0), lattice (>= 0.18-4), MASS, nestcolor (>= 0.1.0), @@ -82,7 +82,7 @@ VignetteBuilder: Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2, rstudio/shiny, insightsengineering/teal, insightsengineering/teal.transform, mllg/checkmate, tidyverse/dplyr, - rstudio/DT, tidyverse/forcats, daroczig/logger, r-lib/scales, + rstudio/DT, tidyverse/forcats, r-lib/scales, daattali/shinyjs, shinyTree/shinyTree, rstudio/shinyvalidate, dreamRs/shinyWidgets, tidyverse/stringr, insightsengineering/teal.code, insightsengineering/teal.data, @@ -91,7 +91,7 @@ Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2, tidyverse/tibble, tidyverse/tidyr, tidymodels/broom, daattali/colourpicker, daattali/ggExtra, aphalo/ggpmisc, aphalo/ggpp, slowkow/ggrepel, baddstats/goftest, gridExtra, ramnathv/htmlwidgets, - jeroen/jsonlite, yihui/knitr, deepayan/lattice, MASS, + jeroen/jsonlite, yihui/knitr, daroczig/logger, deepayan/lattice, MASS, insightsengineering/nestcolor, r-lib/rlang, rstudio/rmarkdown, insightsengineering/rtables, tidyverse/rvest, sparkline, rstudio/shinytest2, insightsengineering/teal.data, r-lib/testthat, diff --git a/NEWS.md b/NEWS.md index 9e446c09b..de6e3a7ed 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,7 @@ * Removed `Show Warnings` modals from modules. ### Enhancements -* Added `logger` functionality for logging changes in shiny inputs in all modules. `logger` was added to Imports. +* Added `teal.logger` functionality for logging changes in shiny inputs in all modules. # teal.modules.general 0.3.0 diff --git a/R/tm_a_pca.R b/R/tm_a_pca.R index 2c7f53045..b2c0a1a2e 100644 --- a/R/tm_a_pca.R +++ b/R/tm_a_pca.R @@ -297,7 +297,7 @@ srv_a_pca <- function(id, data, reporter, filter_panel_api, dat, plot_height, pl checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") response <- dat diff --git a/R/tm_a_regression.R b/R/tm_a_regression.R index 7ee905466..a941e5e20 100644 --- a/R/tm_a_regression.R +++ b/R/tm_a_regression.R @@ -371,7 +371,7 @@ srv_a_regression <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") ns <- session$ns diff --git a/R/tm_data_table.R b/R/tm_data_table.R index 9ffb96207..2d215f8c9 100644 --- a/R/tm_data_table.R +++ b/R/tm_data_table.R @@ -182,7 +182,7 @@ srv_page_data_table <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") if_filtered <- reactive(as.logical(input$if_filtered)) if_distinct <- reactive(as.logical(input$if_distinct)) diff --git a/R/tm_file_viewer.R b/R/tm_file_viewer.R index 48b755ad5..3b96185bb 100644 --- a/R/tm_file_viewer.R +++ b/R/tm_file_viewer.R @@ -124,7 +124,7 @@ ui_viewer <- function(id, ...) { # Server function for the file viewer module srv_viewer <- function(id, input_path) { moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") temp_dir <- tempfile() if (!dir.exists(temp_dir)) { diff --git a/R/tm_front_page.R b/R/tm_front_page.R index 250f46433..fbffb8769 100644 --- a/R/tm_front_page.R +++ b/R/tm_front_page.R @@ -137,7 +137,7 @@ srv_front_page <- function(id, data, tables, show_metadata) { checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") ns <- session$ns diff --git a/R/tm_g_association.R b/R/tm_g_association.R index e9c6d7a19..b0611490c 100644 --- a/R/tm_g_association.R +++ b/R/tm_g_association.R @@ -285,7 +285,7 @@ srv_tm_g_association <- function(id, checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(ref = ref, vars = vars), diff --git a/R/tm_g_bivariate.R b/R/tm_g_bivariate.R index 4c14af171..807b4f23b 100644 --- a/R/tm_g_bivariate.R +++ b/R/tm_g_bivariate.R @@ -459,7 +459,7 @@ srv_g_bivariate <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") ns <- session$ns diff --git a/R/tm_g_distribution.R b/R/tm_g_distribution.R index 42f65f4ff..390ab4c88 100644 --- a/R/tm_g_distribution.R +++ b/R/tm_g_distribution.R @@ -356,7 +356,7 @@ srv_distribution <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") setBookmarkExclude("params_reset") diff --git a/R/tm_g_response.R b/R/tm_g_response.R index 9abe0c78f..44daa300d 100644 --- a/R/tm_g_response.R +++ b/R/tm_g_response.R @@ -313,7 +313,7 @@ srv_g_response <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") data_extract <- list(response = response, x = x, row_facet = row_facet, col_facet = col_facet) diff --git a/R/tm_g_scatterplot.R b/R/tm_g_scatterplot.R index 525d18f68..066ee5506 100644 --- a/R/tm_g_scatterplot.R +++ b/R/tm_g_scatterplot.R @@ -494,7 +494,7 @@ srv_g_scatterplot <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") data_extract <- list( x = x, diff --git a/R/tm_g_scatterplotmatrix.R b/R/tm_g_scatterplotmatrix.R index 9b872d81e..e8c7ce3b9 100644 --- a/R/tm_g_scatterplotmatrix.R +++ b/R/tm_g_scatterplotmatrix.R @@ -266,7 +266,7 @@ srv_g_scatterplotmatrix <- function(id, data, reporter, filter_panel_api, variab checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(variables = variables), diff --git a/R/tm_missing_data.R b/R/tm_missing_data.R index baa7f257f..de72ee834 100644 --- a/R/tm_missing_data.R +++ b/R/tm_missing_data.R @@ -170,7 +170,7 @@ srv_page_missing_data <- function(id, data, reporter, filter_panel_api, parent_d with_reporter <- !missing(reporter) && inherits(reporter, "Reporter") with_filter <- !missing(filter_panel_api) && inherits(filter_panel_api, "FilterPanelAPI") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") datanames <- isolate(teal.data::datanames(data())) datanames <- Filter(function(name) { diff --git a/R/tm_outliers.R b/R/tm_outliers.R index c7c1f8440..7f30b897a 100644 --- a/R/tm_outliers.R +++ b/R/tm_outliers.R @@ -332,7 +332,7 @@ srv_outliers <- function(id, data, reporter, filter_panel_api, outlier_var, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") ns <- session$ns diff --git a/R/tm_t_crosstable.R b/R/tm_t_crosstable.R index 7e91da5fb..d4e3b4700 100644 --- a/R/tm_t_crosstable.R +++ b/R/tm_t_crosstable.R @@ -241,7 +241,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") selector_list <- teal.transform::data_extract_multiple_srv( data_extract = list(x = x, y = y), diff --git a/R/tm_variable_browser.R b/R/tm_variable_browser.R index 233616d43..626822d3d 100644 --- a/R/tm_variable_browser.R +++ b/R/tm_variable_browser.R @@ -201,7 +201,7 @@ srv_variable_browser <- function(id, checkmate::assert_class(data, "reactive") checkmate::assert_class(isolate(data()), "teal_data") moduleServer(id, function(input, output, session) { - if (shiny::isRunning()) logger::log_shiny_input_changes(input, namespace = "teal.modules.general") + teal.logger::log_shiny_input_changes(input, namespace = "teal.modules.general") # if there are < this number of unique records then a numeric # variable can be treated as a factor and all factors with < this groups