From b64e4c3e6ff8f1d6e26896bb6367097ac9215378 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 7 Mar 2024 13:42:54 -0800 Subject: [PATCH] (feat) better debugging when reading prisma --- litellm/proxy/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 81130787d..26ed35604 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -693,6 +693,9 @@ class PrismaClient: """ Generic implementation of get data """ + verbose_proxy_logger.debug( + f"PrismaClient: get_generic_data: {key}, table_name: {table_name}" + ) try: if table_name == "users": response = await self.db.litellm_usertable.find_first( @@ -758,6 +761,9 @@ class PrismaClient: int ] = None, # pagination, number of rows to getch when find_all==True ): + verbose_proxy_logger.debug( + f"PrismaClient: get_data: table_name: {table_name}, query_type: {query_type}, user_id: {user_id}, user_id_list: {user_id_list}, team_id: {team_id}, team_id_list: {team_id_list}, key_val: {key_val}" + ) try: response: Any = None if (token is not None and table_name is None) or ( @@ -1020,6 +1026,7 @@ class PrismaClient: Add a key to the database. If it already exists, do nothing. """ try: + verbose_proxy_logger.debug(f"PrismaClient: insert_data: {data}") if table_name == "key": token = data["token"] hashed_token = self.hash_token(token=token) @@ -1152,6 +1159,9 @@ class PrismaClient: """ Update existing data """ + verbose_proxy_logger.debug( + f"PrismaClient: update_data, table_name: {table_name}" + ) try: db_data = self.jsonify_object(data=data) if update_key_values is not None: