You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Simplify how we log stuff and get rid of the ContextualLogger
* Allow configuring the logger destination
* Use Langchain logger on OpenAI client requests
* Reduce verbosity of logger by replacing info msgs with debug
* Use Langchain logger on Google LLMs http requests
* Reuse logger formatter
* Revert unwanted changes
* Update changelog
- Simplify and consolidate logging for some of the LLM providers (namely OpenAI and Google). Now most of the HTTP requests are being logged when on DEBUG level
5
+
- Improve doc on how to set up a custom logger with a custom destination
4
6
5
7
## [0.16.0] - 2024-09-19
6
8
- Remove `Langchain::Thread` class as it was not needed.
Langchain.rb uses standard logging mechanisms and defaults to `:warn` level. Most messages are at info level, but we will add debug or warn statements as needed.
629
+
Langchain.rb uses the standard Ruby [Logger](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html) mechanism and defaults to same `level` value (currently `Logger::DEBUG`).
630
+
630
631
To show all log messages:
631
632
632
633
```ruby
633
-
Langchain.logger.level =:debug
634
+
Langchain.logger.level =Logger::DEBUG
635
+
```
636
+
637
+
The logger logs to `STDOUT` by default. In order to configure the log destination (ie. log to a file) do:
0 commit comments