Skip to content

Commit

Permalink
Merge pull request #545 from takahirom/takahirom/remove-api-key-from-…
Browse files Browse the repository at this point in the history
…log/2024-11-07

Remove API key from log when using OpenAiAiAssertionModel.loggingEnabled = true
  • Loading branch information
takahirom authored Nov 7, 2024
2 parents 01f7df8 + cc4ae0b commit 5f0062d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ class OpenAiAiAssertionModel(
}
if (loggingEnabled) {
install(Logging) {
logger = Logger.SIMPLE
logger = object: Logger {
override fun log(message: String) {
Logger.SIMPLE.log(message.replace(apiKey, "****"))
}
}
level = LogLevel.ALL
}
}
Expand Down

0 comments on commit 5f0062d

Please sign in to comment.