Skip to content

Commit

Permalink
fix defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 21, 2025
1 parent 68bc1fd commit 094735e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ namespaces_reset <- function() {

namespaces_default <- function() {
has_glue <- requireNamespace("glue", quietly = TRUE)
is_running_gha <- isTRUE(Sys.getenv("GITHUB_ACTIONS") == "true")
is_running_gha <- isTRUE(Sys.getenv("GITHUB_ACTIONS") == "true") && !needs_stdout()

list(
global = list(
default = list(
threshold = as.loglevel(Sys.getenv("LOGGER_LOG_LEVEL", unset = "INFO")),
layout = if (is_running_gha) layout_gha else layout_simple,
formatter = if (has_glue) formatter_glue else formatter_sprintf,
appender = if (needs_stdout()) appender_stdout else if (is_running_gha) appender_stderr else appender_console
appender = if (is_running_gha) appender_stderr else if (needs_stdout()) appender_stdout else appender_console
)
),
.logger = list(
default = list(
threshold = ERROR,
layout = if (is_running_gha) layout_gha else layout_simple,
formatter = formatter_sprintf,
appender = if (needs_stdout()) appender_stdout else if (is_running_gha) appender_stderr else appender_console
appender = if (is_running_gha) appender_stderr else if (needs_stdout()) appender_stdout else appender_console
)
)
)
Expand Down

0 comments on commit 094735e

Please sign in to comment.