From 3a1c3c375334113e10e5093acf7d59d59ebd9afc Mon Sep 17 00:00:00 2001 From: David vonThenen <12752197+dvonthenen@users.noreply.github.com> Date: Tue, 9 Apr 2024 11:17:18 -0700 Subject: [PATCH] Update README with Logging Info/Settings --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 7e9201f7..e2510479 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Official Python SDK for [Deepgram](https://www.deepgram.com/). Power your apps w - [PreRecorded Audio Transcription Quickstart](#prerecorded-audio-transcription-quickstart) - [Live Audio Transcription Quickstart](#live-audio-transcription-quickstart) - [Examples](#examples) +- [Logging](#logging) - [Development and Contributing](#development-and-contributing) - [Getting Help](#getting-help) @@ -203,6 +204,24 @@ These examples provide: To run each example set the `DEEPGRAM_API_KEY` as an environment variable, then `cd` into each example folder and execute the example: `go run main.py`. + +# Logging + +This SDK provides logging as a means to troubleshoot and debug issues encountered. By default, this SDK will enable `Information` level messages and higher (ie `Warning`, `Error`, etc) when you initialize the library as follows: + +```python +deepgram: DeepgramClient = DeepgramClient() +``` + +To increase the logging output/verbosity for debug or troubleshooting purposes, you can set the `DEBUG` level but using this code: + +```python +config: DeepgramClientOptions = DeepgramClientOptions( + verbose=logging.DEBUG, +) +deepgram: DeepgramClient = DeepgramClient("", config) +``` + # Development and Contributing Interested in contributing? We ❤️ pull requests!