Skip to content

Commit

Permalink
Fix logger for external validation (#453)
Browse files Browse the repository at this point in the history
* create logger at top level when externally validating
  • Loading branch information
egillax authored May 15, 2024
1 parent b699293 commit 7ed447f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions R/ExternalValidatePlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,18 @@ validateExternal <- function(validationDesignList,
for (name in databaseNames) {
analysisInfo[name] <- 1
}

# initiate log
logSettings$saveDirectory <- outputFolder
logSettings$logFileName <- 'validationLog'
logger <- do.call(createLog, logSettings)
ParallelLogger::registerLogger(logger)
on.exit(closeLog(logger))

results <- NULL
for (design in validationDesignList) {
for (database in databaseDetails) {
databaseName <- database$cdmDatabaseName
# initiate log
logSettings$saveDirectory <- file.path(outputFolder,
database$cdmDatabaseName)
logSettings$logFileName <- 'validationLog'
logger <- do.call(createLog, logSettings)
ParallelLogger::registerLogger(logger)
on.exit(closeLog(logger))

ParallelLogger::logInfo(paste('Validating model on', database$cdmDatabaseName))

Expand Down

0 comments on commit 7ed447f

Please sign in to comment.