Skip to content

Commit

Permalink
shetts: fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Oct 25, 2023
1 parent 451100d commit 8d42964
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions automon/integrations/google/sheets/client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from automon.log import Logging
from automon.log import logger
from automon.integrations.google.auth import GoogleAuthClient

from .config import GoogleSheetsConfig

log = Logging(name='GoogleSheetsClient', level=Logging.DEBUG)
log = logger.logging.getLogger(__name__)
log.setLevel(logger.DEBUG)


class Fields:
Expand Down Expand Up @@ -94,7 +95,7 @@ def get(
**kwargs,
).execute()
except Exception as e:
log.error(f'{e}', enable_traceback=False)
log.error(f'{e}')

return self

Expand All @@ -112,7 +113,7 @@ def get_values(
**kwargs,
).execute()
except Exception as e:
log.error(f'{e}', enable_traceback=False)
log.error(f'{e}')

return self

Expand Down
5 changes: 3 additions & 2 deletions automon/integrations/google/sheets/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from automon.log import Logging
from automon.log import logger
from automon.helpers.osWrapper import environ
from automon.integrations.google.auth import GoogleAuthConfig

log = Logging(name='SheetsConfig', level=Logging.DEBUG)
log = logger.logging.getLogger(__name__)
log.setLevel(logger.DEBUG)


class GoogleSheetsConfig(GoogleAuthConfig):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas as pd
import numpy as np

from automon import Logging
from automon import logger
from automon.integrations.facebook import FacebookGroups
from automon.integrations.google.sheets import GoogleSheetsClient

Expand All @@ -25,7 +25,8 @@

tracemalloc.start()

log = Logging(level=Logging.INFO)
log = logger.logging.getLogger(__name__)
log.setLevel(logger.INFO)

sheets_client = GoogleSheetsClient(
worksheet='Automated Count WIP',
Expand Down

0 comments on commit 8d42964

Please sign in to comment.