File tree Expand file tree Collapse file tree 5 files changed +12
-24
lines changed
airbyte-integrations/connectors/destination-glide Expand file tree Collapse file tree 5 files changed +12
-24
lines changed Original file line number Diff line number Diff line change 1616
1717from .glide import Column , GlideBigTableFactory
1818import json
19- from .log import getLogger
19+ from .log import LOG_LEVEL_DEFAULT
2020import logging
2121import requests
2222from typing import Any , Iterable , Mapping
2525CONFIG_GLIDE_API_VERSION_DEFAULT = "tables"
2626CONFIG_GLIDE_API_HOST_DEFAULT = "https://api.glideapp.io"
2727
28- logger = getLogger ()
28+ logger = logging .getLogger (__name__ )
29+ logger .setLevel (LOG_LEVEL_DEFAULT )
2930
3031
3132def mapJsonSchemaTypeToGlideType (json_type : str ) -> str :
Original file line number Diff line number Diff line change 11from abc import ABC , abstractmethod
2+ from .log import LOG_LEVEL_DEFAULT
3+ import logging
24import requests
35from typing import Dict , Any , Iterator , List
46
5- from .log import getLogger
6-
7- logger = getLogger ()
7+ logger = logging .getLogger (__name__ )
8+ logger .setLevel (LOG_LEVEL_DEFAULT )
89
910BigTableRow = Dict [str , Any ]
1011
@@ -201,6 +202,7 @@ def finalize_stash(self) -> None:
201202 r .raise_for_status ()
202203 except Exception as e :
203204 raise Exception (f"failed to finalize stash" ) from e # nopep8
205+ logger .info (f"Successfully finalized record stash for table '{ self .table_id } ' (stash ID '{ self .stash_id } ')" )
204206
205207 def commit (self ) -> None :
206208 self .raise_if_set_schema_not_called ()
Original file line number Diff line number Diff line change 11
22import logging
33
4- # Create a logger
5-
6- logger = logging .getLogger ("destination-glide" )
7- logger .setLevel (logging .DEBUG )
8-
9- # Create a file handler
10- # TODO REMOVE?
11- handler = logging .FileHandler ('destination-glide.log' )
12- handler .setLevel (logging .INFO )
13- # Create a logging format
14- formatter = logging .Formatter (
15- '%(asctime)s - %(name)s - %(levelname)s - %(message)s' )
16- handler .setFormatter (formatter )
17- # Add the handlers to the logger
18- logger .addHandler (handler )
19-
20- def getLogger () -> logging .Logger :
21- return logger
4+ LOG_LEVEL_DEFAULT = logging .INFO
Original file line number Diff line number Diff line change 44- [ +] fix: "add rows failed with status 400: {"message":"More than 500 mutations"}" in mutation api (batch them to ~ 100 or something)
55- [ +] fix: batch row adds in rest api
66- [ +] chore: unify test framework across unit/integration tests (remove pytest?)
7- - [ +] feat: snuggle rows in batch
7+ - [ +] feat: snuggle rows in a batch
88- [ ] feat: support multiple streams from source by using a naming convention and discovering existing tables with GET /tables
99- [ ] fix: replace "hostname" and "path" configs with "baseUrl"
1010- [ ] feat: verify actual host/api/auth connection in check: https://docs.airbyte.com/understanding-airbyte/airbyte-protocol#check
Original file line number Diff line number Diff line change 1313from datetime import datetime
1414from destination_glide import DestinationGlide
1515from destination_glide .glide import GlideBigTableBase , GlideBigTableFactory
16+ from destination_glide .log import LOG_LEVEL_DEFAULT
1617import json
1718import logging
1819import random
@@ -48,6 +49,7 @@ def table_schema() -> str:
4849
4950def AirbyteLogger () -> logging .Logger :
5051 logger = logging .getLogger ('airbyte' )
52+ logger .setLevel (LOG_LEVEL_DEFAULT )
5153
5254
5355def configured_catalog (test_table_name : str , table_schema : str ) -> ConfiguredAirbyteCatalog :
You can’t perform that action at this time.
0 commit comments