diff --git a/DESCRIPTION b/DESCRIPTION index f592fb0c..0e55678e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rapbase Type: Package Title: Base Functions and Resources for Rapporteket -Version: 1.23.0 +Version: 1.23.1 Authors@R: c( person(given = "Are", family = "Edvardsen", @@ -45,7 +45,7 @@ Imports: sship (>= 0.8.0), utils, yaml -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.1 URL: https://github.com/Rapporteket/rapbase BugReports: https://github.com/Rapporteket/rapbase/issues Suggests: diff --git a/NAMESPACE b/NAMESPACE index 823bf246..c07afb87 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -67,6 +67,7 @@ export(repLogger) export(runAutoReport) export(runBulletin) export(runNoweb) +export(sanitizeLog) export(saveStagingData) export(selectListPubkey) export(sendEmail) diff --git a/NEWS.md b/NEWS.md index 5e2ff097..adcc922c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# rapbase 1.23.1 + +* Fixed Fixed bug in log sanitizer function ([#130](https://github.com/Rapporteket/rapbase/pull/130)) + # rapbase 1.23.0 * Reduced number of imports by replacing local function with functions from [sship](https://github.com/Rapporteket/sship) ([#127](https://github.com/Rapporteket/rapbase/pull/127)) diff --git a/R/log.R b/R/log.R index 4f106b85..1f06b066 100644 --- a/R/log.R +++ b/R/log.R @@ -404,7 +404,7 @@ readLog <- function(type, name = "") { #' Sanitize log entries that have reached end of life #' #' @return NULL on success -#' @keywords internal +#' @export sanitizeLog <- function() { conf <- getConfig(fileName = "rapbaseConfig.yml") @@ -431,7 +431,14 @@ sanitizeLog <- function() { if (backupOk) { lf <- lf %>% dplyr::filter(as.Date(.data$time) > eolDate) - write.table(lf, logFile[i], append = FALSE, col.names = TRUE, sep = ",") + write.table( + lf, + logFile[i], + append = FALSE, + sep = ",", + row.names = FALSE, + col.names = TRUE, + qmethod = "double") } } } diff --git a/_pkgdown.yml b/_pkgdown.yml index adc1f5fc..4613ffd6 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -50,6 +50,7 @@ reference: Handle logging contents: - logger + - sanitizeLog - title: Automated reports desc: > diff --git a/man/sanitizeLog.Rd b/man/sanitizeLog.Rd index 023b78de..966be87f 100644 --- a/man/sanitizeLog.Rd +++ b/man/sanitizeLog.Rd @@ -12,4 +12,3 @@ NULL on success \description{ Sanitize log entries that have reached end of life } -\keyword{internal}