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 cc4ae0b
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 cc4ae0b

Please sign in to comment.