Skip to content

Commit

Permalink
Avoid leaking sensitive data in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsloan committed Oct 24, 2024
1 parent bff785f commit f79a1cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RecordsQueue(
def enqueueAll(records: NonEmptySeq[RenderedRecord]): IO[Unit] =
for {
_ <- IO.delay(logger.debug(s"${records.length} records added to $recordsQueue"))
_ <- IO(recordsQueue.getAndUpdate(q => q ++ records.toSeq).void)
_ <- recordsQueue.getAndUpdate(q => q ++ records.toSeq).void
} yield ()

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ case class SimpleTemplate(
records.head match {
case RenderedRecord(_, _, recordRendered, headersRendered, endpointRendered) =>
logger.debug(
s"Processed template with endpoint=${records.head.endpointRendered}, tidyJson=$tidyJson, recordRendered=$recordRendered",
s"Processed template with tidyJson=$tidyJson",
)
ProcessedTemplate(endpointRendered, recordRendered, headersRendered).asRight
}
Expand Down Expand Up @@ -111,7 +111,7 @@ case class TemplateWithInnerLoop(
}
val contentOrError = fnContextFix(prefixContent + replaceWith + suffixContent)
logger.debug(
s"Processed template with endpoint=${records.head.endpointRendered} prefixContent=$prefixContent, suffixContent=$suffixContent, replaceWith=$replaceWith, tidyJson=$tidyJson, contentOrError=$contentOrError",
s"Processed template with prefixContent=$prefixContent, suffixContent=$suffixContent, tidyJson=$tidyJson",
)
ProcessedTemplate(
endpoint = records.head.endpointRendered,
Expand Down

0 comments on commit f79a1cd

Please sign in to comment.