python-databases 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ from datetime import datetime, timezone
6
6
  from enum import Enum
7
7
  from typing import Optional, Any
8
8
  import pandas as pd
9
+ from custom_python_logger import get_logger
9
10
  from elasticsearch import Elasticsearch, helpers
10
11
  from retrying import retry
11
12
 
@@ -25,7 +26,7 @@ class ElasticSearch(ABC):
25
26
  username: Optional[str],
26
27
  password: Optional[str]
27
28
  ):
28
- self.logger = logging.getLogger(self.__class__.__name__)
29
+ self.logger = get_logger(self.__class__.__name__)
29
30
  self._change_elasticsearch_logger()
30
31
 
31
32
  self.protocol = protocol
@@ -43,7 +44,7 @@ class ElasticSearch(ABC):
43
44
  self.elk_client = None
44
45
 
45
46
  def _change_elasticsearch_logger(self):
46
- tracer = logging.getLogger('elasticsearch')
47
+ tracer = get_logger('elasticsearch')
47
48
  tracer.setLevel(logging.CRITICAL) # or desired level
48
49
  # tracer.addHandler(logging.FileHandler('indexer.log'))
49
50
 
@@ -260,7 +261,7 @@ class ElasticSearchOnPrem(ElasticSearch):
260
261
  password=password
261
262
  )
262
263
 
263
- self.logger = logging.getLogger(self.__class__.__name__)
264
+ self.logger = get_logger(self.__class__.__name__)
264
265
 
265
266
  self.connect_to_elasticsearch()
266
267
 
@@ -303,7 +304,7 @@ class ElasticSearchCloud(ElasticSearch):
303
304
  password=password
304
305
  )
305
306
 
306
- self.logger = logging.getLogger(self.__class__.__name__)
307
+ self.logger = get_logger(self.__class__.__name__)
307
308
 
308
309
  self.connect_to_elasticsearch()
309
310
 
@@ -2,6 +2,7 @@ import logging
2
2
  import os
3
3
  from typing import Optional, Union, Any
4
4
  import psycopg2
5
+ from custom_python_logger import get_logger
5
6
  from psycopg2 import extras
6
7
  from retrying import retry
7
8
 
@@ -15,7 +16,7 @@ class PostgreSQL:
15
16
  username: Optional[str] = None,
16
17
  password: Optional[str] = None
17
18
  ):
18
- self.logger = logging.getLogger(self.__class__.__name__)
19
+ self.logger = get_logger(self.__class__.__name__)
19
20
 
20
21
  self.name = name or os.getenv("POSTGRESQL_NAME")
21
22
  self.host = host or os.getenv("POSTGRESQL_HOST")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-databases
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: A Python library for managing and interacting with multiple databases seamlessly.
5
5
  Home-page: https://github.com/aviz92/python-databases
6
6
  Author: Avi Zaguri
@@ -1,10 +1,10 @@
1
1
  python_databases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  python_databases/elasticsearch_infrastructure/__init__.py,sha256=zLL3GJwgu5a55TgRhyl_mDbjc-qQBWOskRc0y9diqyw,296
3
- python_databases/elasticsearch_infrastructure/elasticsearch.py,sha256=U8PVhjImk_S35KJHKEFK7Fl8cL-0A36yzLJ_KgtNTIY,11160
3
+ python_databases/elasticsearch_infrastructure/elasticsearch.py,sha256=WWlYi7icu3mJLEFDL98XbrG2bhAyBx1u_Xv8EPEgQt8,11176
4
4
  python_databases/postgresql_infrastructure/__init__.py,sha256=h1eJx0ogbtcF6UnN2c7uW5iCuadDab3So1VI15y3kWA,150
5
- python_databases/postgresql_infrastructure/postgresql.py,sha256=uYf8llU0p4ooLWV-x-aL959267Uq9OgQXzCf8CCC8f8,2819
6
- python_databases-0.1.3.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
7
- python_databases-0.1.3.dist-info/METADATA,sha256=fLorTLUGKXmKMl661NuSJJlmbPBUoHcb6QkvhBeJx-A,1792
8
- python_databases-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- python_databases-0.1.3.dist-info/top_level.txt,sha256=fXcMUntaYJfKeFS7FjQ6DY4WVXYBsgdrDmhOudYs-vg,17
10
- python_databases-0.1.3.dist-info/RECORD,,
5
+ python_databases/postgresql_infrastructure/postgresql.py,sha256=zH8y5w2k2djhHLefDJhlGwa6MtoZKONhJ5vMxIxDdlc,2856
6
+ python_databases-0.1.4.dist-info/licenses/LICENSE,sha256=cSikHY6SZFsPZSBizCDAJ0-Bjjzxt-JtX6TVbKxwimo,1067
7
+ python_databases-0.1.4.dist-info/METADATA,sha256=i0_YUTvulCbHXObsil2bPLbHsXv3XDh_IxpHsx6QWrg,1792
8
+ python_databases-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ python_databases-0.1.4.dist-info/top_level.txt,sha256=fXcMUntaYJfKeFS7FjQ6DY4WVXYBsgdrDmhOudYs-vg,17
10
+ python_databases-0.1.4.dist-info/RECORD,,