Skip to content

Commit

Permalink
Remove API key from log when using loggingEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Nov 7, 2024
1 parent 01f7df8 commit 07a6d6f
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, "API_KEY"))
}
}
level = LogLevel.ALL
}
}
Expand Down

0 comments on commit 07a6d6f

Please sign in to comment.