Last active
July 30, 2025 19:05
-
-
Save KrzysztofCwalina/936bd1c0d7dd613a9b8149145fd30e2b to your computer and use it in GitHub Desktop.
Logging options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // dotnet package add Microsoft.Extensions.Logging.Console | |
| ClientLoggingOptions loggingOptions = new() | |
| { | |
| EnableLogging = true, | |
| EnableMessageContentLogging = true, | |
| EnableMessageLogging = true, | |
| LoggerFactory = LoggerFactory.Create(builder => builder | |
| .AddConsole() | |
| .SetMinimumLevel(LogLevel.Trace)) | |
| }; | |
| OpenAIClientOptions options = new() | |
| { | |
| ClientLoggingOptions = loggingOptions | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment