Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register teal.logger handlers; replace log_info with message #1010

Merged
merged 5 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Imports:
ggrepel,
grid,
lifecycle (>= 0.2.0),
logger (>= 0.2.0),
methods,
rlistings (>= 0.2.7),
rmarkdown (>= 2.19),
Expand All @@ -58,7 +57,7 @@ Imports:
stats,
teal.code (>= 0.5.0),
teal.data (>= 0.4.0),
teal.logger (>= 0.1.1),
teal.logger (>= 0.1.3.9013),
teal.reporter (>= 0.2.1),
teal.widgets (>= 0.4.0),
tern.gee (>= 0.1.3),
Expand All @@ -68,6 +67,7 @@ Imports:
Suggests:
forcats,
knitr (>= 1.34),
logger (>= 0.2.0),
lubridate (>= 1.7.9),
nestcolor (>= 0.1.0),
styler,
Expand Down
2 changes: 1 addition & 1 deletion R/tm_a_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ tm_a_gee <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_a_gee (prototype)")
message("Initializing tm_a_gee (prototype)")

cov_var <- teal.transform::add_no_selected_choices(cov_var, multiple = TRUE)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_a_mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ tm_a_mmrm <- function(label,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args(),
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_a_mmrm")
message("Initializing tm_a_mmrm")
cov_var <- teal.transform::add_no_selected_choices(cov_var, multiple = TRUE)
checkmate::assert_string(label)
checkmate::assert_string(total_label)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ tm_g_barchart_simple <- function(x = NULL,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_barchart_simple")
message("Initializing tm_g_barchart_simple")
checkmate::assert_string(label)
checkmate::assert_list(plot_options, null.ok = TRUE)
if (length(c(x, fill, x_facet, y_facet)) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ tm_g_ci <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_ci")
message("Initializing tm_g_ci")
checkmate::assert_string(label)
stat <- match.arg(stat)
checkmate::assert_class(y_var, classes = "data_extract_spec")
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ tm_g_forest_rsp <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_forest_rsp")
message("Initializing tm_g_forest_rsp")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ tm_g_forest_tte <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_forest_tte")
message("Initializing tm_g_forest_tte")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ tm_g_ipp <- function(label,
base_var <- baseline_var # resolves missing argument error
}

logger::log_info("Initializing tm_g_ipp")
message("Initializing tm_g_ipp")
checkmate::assert_class(arm_var, "choices_selected")
checkmate::assert_class(paramcd, "choices_selected")
checkmate::assert_class(id_var, "choices_selected")
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ tm_g_km <- function(label,
plot_width = NULL,
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_g_km")
message("Initializing tm_g_km")

checkmate::assert_string(label)
checkmate::assert_string(dataname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ tm_g_lineplot <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_lineplot")
message("Initializing tm_g_lineplot")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ tm_g_pp_adverse_events <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_pp_adverse_events")
message("Initializing tm_g_pp_adverse_events")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ tm_g_pp_patient_timeline <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_pp_patient_timeline")
message("Initializing tm_g_pp_patient_timeline")
checkmate::assert_string(label)
checkmate::assert_string(dataname_adcm)
checkmate::assert_string(dataname_adae)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ tm_g_pp_therapy <- function(label,
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()) {
logger::log_info("Initializing tm_g_pp_therapy")
message("Initializing tm_g_pp_therapy")
checkmate::assert_class(atirel, "choices_selected", null.ok = TRUE)
checkmate::assert_class(cmdecod, "choices_selected", null.ok = TRUE)
checkmate::assert_class(cmindc, "choices_selected", null.ok = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ tm_g_pp_vitals <- function(label,
aval <- aval_var # resolves missing argument error
}

logger::log_info("Initializing tm_g_pp_vitals")
message("Initializing tm_g_pp_vitals")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_abnormality.R
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ tm_t_abnormality <- function(label,
post_output = NULL,
na_level = default_na_str(),
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_abnormality")
message("Initializing tm_t_abnormality")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_abnormality_by_worst_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ tm_t_abnormality_by_worst_grade <- function(label, # nolint: object_length.
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_abnormality_by_worst_grade")
message("Initializing tm_t_abnormality_by_worst_grade")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ tm_t_ancova <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_ancova")
message("Initializing tm_t_ancova")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ tm_t_binary_outcome <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_binary_outcome")
message("Initializing tm_t_binary_outcome")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_coxreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ tm_t_coxreg <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_coxreg")
message("Initializing tm_t_coxreg")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ tm_t_events <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_events")
message("Initializing tm_t_events")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_events_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ tm_t_events_by_grade <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_events_by_grade")
message("Initializing tm_t_events_by_grade")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_events_patyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ tm_t_events_patyear <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_events_patyear")
message("Initializing tm_t_events_patyear")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_events_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ tm_t_events_summary <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_events_summary")
message("Initializing tm_t_events_summary")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_exposure.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ tm_t_exposure <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_exposure")
message("Initializing tm_t_exposure")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_logistic.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ tm_t_logistic <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_logistic")
message("Initializing tm_t_logistic")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_mult_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ tm_t_mult_events <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_mult_events")
message("Initializing tm_t_mult_events")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_basic_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ tm_t_pp_basic_info <- function(label,
vars = NULL,
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_t_pp_basic_info")
message("Initializing tm_t_pp_basic_info")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(patient_col)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_laboratory.R
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ tm_t_pp_laboratory <- function(label,
avalu <- avalu_var # resolves missing argument error
}

logger::log_info("Initializing tm_t_pp_laboratory")
message("Initializing tm_t_pp_laboratory")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_medical_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ tm_t_pp_medical_history <- function(label,
mhdistat = NULL,
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_t_pp_medical_history")
message("Initializing tm_t_pp_medical_history")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_prior_medication.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ tm_t_pp_prior_medication <- function(label,
cmstdy = NULL,
pre_output = NULL,
post_output = NULL) {
logger::log_info("Initializing tm_t_pp_prior_medication")
message("Initializing tm_t_pp_prior_medication")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_shift_by_arm.R
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ tm_t_shift_by_arm <- function(label,
base_var <- baseline_var # resolves missing argument error
}

logger::log_info("Initializing tm_t_shift_by_arm")
message("Initializing tm_t_shift_by_arm")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_shift_by_arm_by_worst.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ tm_t_shift_by_arm_by_worst <- function(label,
base_var <- baseline_var # resolves missing argument error
}

logger::log_info("Initializing tm_t_shift_by_arm_by_worst")
message("Initializing tm_t_shift_by_arm_by_worst")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_shift_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ tm_t_shift_by_grade <- function(label,
na_level = default_na_str(),
code_missing_baseline = FALSE,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_shift_by_grade")
message("Initializing tm_t_shift_by_grade")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_smq.R
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ tm_t_smq <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_smq")
message("Initializing tm_t_smq")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ tm_t_summary <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_summary")
message("Initializing tm_t_summary")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_summary_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ tm_t_summary_by <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_summary_by")
message("Initializing tm_t_summary_by")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ tm_t_tte <- function(label,
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()) {
logger::log_info("Initializing tm_t_tte")
message("Initializing tm_t_tte")
checkmate::assert_string(label)
checkmate::assert_string(dataname)
checkmate::assert_string(parentname)
Expand Down
1 change: 1 addition & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.onLoad <- function(libname, pkgname) {
teal.logger::register_logger(namespace = "teal.modules.clinical")
teal.logger::register_handlers("teal.modules.clinical")
tern::set_default_na_str("<Missing>")
}
Loading