azpaddypy 0.2.1__py3-none-any.whl → 0.2.2__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.
azpaddypy/mgmt/logging.py CHANGED
@@ -16,11 +16,18 @@ from opentelemetry.context import Context
16
16
 
17
17
 
18
18
  class AzureLogger:
19
+ _instance = None
20
+ _initialized = False
19
21
  """
20
22
  Comprehensive logging class for Azure Functions and Azure Web Apps
21
23
  using Azure Monitor OpenTelemetry integration with advanced tracing capabilities.
22
24
  """
23
25
 
26
+ def __new__(cls, *args, **kwargs):
27
+ if cls._instance is None:
28
+ cls._instance = super(AzureLogger, cls).__new__(cls)
29
+ return cls._instance
30
+
24
31
  def __init__(
25
32
  self,
26
33
  service_name: str,
@@ -30,6 +37,9 @@ class AzureLogger:
30
37
  enable_console_logging: bool = True,
31
38
  custom_resource_attributes: Optional[Dict[str, str]] = None,
32
39
  ):
40
+ if self.__class__._initialized:
41
+ return
42
+ self.__class__._initialized = True
33
43
  """
34
44
  Initialize the Azure Logger with OpenTelemetry tracing
35
45
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azpaddypy
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Add your description here
5
5
  Classifier: Operating System :: OS Independent
6
6
  Requires-Python: >=3.11
@@ -0,0 +1,9 @@
1
+ azpaddypy/mgmt/__init__.py,sha256=5-0eZuJMZlCONZNJ5hEvWXfvLIM36mg7FsEVs32bY_A,183
2
+ azpaddypy/mgmt/logging.py,sha256=A-56GNbSWAFnKNPcoa-NfTINbBWvJf-p4ZGxUz7M4uQ,25777
3
+ azpaddypy/test_function/__init__.py,sha256=0NjUl36wvUWV79GpRwBFkgkBaC6uDZsTdaSVOIHMFEU,3481
4
+ azpaddypy/test_function/function_app.py,sha256=6nX54-iq0L1l_hZpD6E744-j79oLxdaldFyWDCpwH7c,3867
5
+ azpaddypy-0.2.2.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
6
+ azpaddypy-0.2.2.dist-info/METADATA,sha256=AM8Zw5IFOQVOQcd5zB2J473u1jSy9oDqOtoLpU-mhjc,304
7
+ azpaddypy-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ azpaddypy-0.2.2.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
9
+ azpaddypy-0.2.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- azpaddypy/mgmt/__init__.py,sha256=5-0eZuJMZlCONZNJ5hEvWXfvLIM36mg7FsEVs32bY_A,183
2
- azpaddypy/mgmt/logging.py,sha256=9u114Ji-cwBMUf8D02i_b_Ei2dZc3TaIUH4uJv_tmSc,25451
3
- azpaddypy/test_function/__init__.py,sha256=0NjUl36wvUWV79GpRwBFkgkBaC6uDZsTdaSVOIHMFEU,3481
4
- azpaddypy/test_function/function_app.py,sha256=6nX54-iq0L1l_hZpD6E744-j79oLxdaldFyWDCpwH7c,3867
5
- azpaddypy-0.2.1.dist-info/licenses/LICENSE,sha256=hQ6t0g2QaewGCQICHqTckBFbMVakGmoyTAzDpmEYV4c,1089
6
- azpaddypy-0.2.1.dist-info/METADATA,sha256=ShjmEYaQg37Y05nj6Jv4zdm2KlU2Bkfo1ya0z5IdnUo,304
7
- azpaddypy-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- azpaddypy-0.2.1.dist-info/top_level.txt,sha256=hsDuboDhT61320ML8X479ezSTwT3rrlDWz1_Z45B2cs,10
9
- azpaddypy-0.2.1.dist-info/RECORD,,