Skip to content

Commit

Permalink
missed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Apr 24, 2024
1 parent 34c8892 commit 8441053
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

# Define your base version
version = '0.46.4'
version = '0.47.0'

setup(
name='sunholo',
Expand All @@ -23,6 +23,7 @@
install_requires=[
# List your dependencies here
"asyncpg",
"fastapi",
"google-cloud-alloydb-connector[pg8000]",
"google-cloud-logging",
"google-cloud-storage",
Expand Down
5 changes: 3 additions & 2 deletions sunholo/logging.py
Expand Up @@ -60,8 +60,9 @@ def setup_logging(self, log_level=logging.INFO, logger_name=None):
return self # Return the instance itself on success
except Exception as e:
# If there's an exception, use standard Python logging as a fallback
log.basicConfig(level=self.log_level, format='%(asctime)s - %(levelname)s - %(message)s')
log.warning(f"Failed to set up Google Cloud log. Using standard log. Error: {e}")
import logging
logging.basicConfig(level=self.log_level, format='%(asctime)s - %(levelname)s - %(message)s')
logging.warning(f"Failed to set up Google Cloud log. Using standard log. Error: {e}")
return logging

def _get_caller_info(self):
Expand Down

0 comments on commit 8441053

Please sign in to comment.