diff --git a/DESCRIPTION b/DESCRIPTION index d9644cf..5f5ad63 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: logger Title: A Lightweight, Modern and Flexible Logging Utility -Version: 0.4.1.9001 +Version: 0.4.1.9002 Date: 2025-10-29 Authors@R: c( person("Gergely", "Daróczi", , "daroczig@rapporter.net", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 36194a1..f6b978f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ New features and quality of life improvements: * Added `appender_ntfy()` to use {ntfy} as an appender (#240, @jonocarroll) +* `normalizePath()` in the `log_call_location()` no longer triggers warning + if the package source does not exist (#241, @maksymiuks) # logger 0.4.1 (2025-09-08) diff --git a/R/helpers.R b/R/helpers.R index e279350..dbe7544 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -72,9 +72,9 @@ log_eval <- function(expr, level = TRACE, multiline = FALSE) { ## return the results of the call if (res$visible == TRUE) { - return(res$value) + res$value } else { - return(invisible(res$value)) + invisible(res$value) } } diff --git a/R/layouts.R b/R/layouts.R index 5ab4c26..3225c99 100644 --- a/R/layouts.R +++ b/R/layouts.R @@ -429,7 +429,7 @@ layout_syslognet <- structure( "DEBUG" = "DEBUG", "TRACE" = "DEBUG" ) - return(ret) + ret }, generator = quote(layout_syslognet()) ) diff --git a/R/utils.R b/R/utils.R index 7a32a5f..5592f72 100644 --- a/R/utils.R +++ b/R/utils.R @@ -61,7 +61,7 @@ log_call_location <- function(.logcall) { loc$line <- ref[1L] file <- attr(ref, "srcfile") if (!is.null(file)) { - loc$path <- normalizePath(file$filename, winslash = "/") + loc$path <- normalizePath(file$filename, winslash = "/", mustWork = FALSE) } break }