maleo-logging 0.0.2__py3-none-any.whl → 0.0.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.
maleo/logging/enums.py CHANGED
@@ -20,6 +20,7 @@ class LoggerType(StrEnum):
20
20
  CLIENT = "client"
21
21
  CONTROLLER = "controller"
22
22
  DATABASE = "database"
23
+ EXCEPTION = "exception"
23
24
  MIDDLEWARE = "middleware"
24
25
  REPOSITORY = "repository"
25
26
  SERVICE = "service"
maleo/logging/logger.py CHANGED
@@ -305,6 +305,32 @@ class Database(Base):
305
305
  )
306
306
 
307
307
 
308
+ class Exception(Base):
309
+ def __init__(
310
+ self,
311
+ dir: str,
312
+ environment: Optional[Environment] = None,
313
+ service_key: Optional[Key] = None,
314
+ level=Level.INFO,
315
+ google_cloud_logging=None,
316
+ labels: OptionalStringToStringDict = None,
317
+ aggregate_file_name: OptionalString = None,
318
+ inidividual_log: bool = True,
319
+ ):
320
+ super().__init__(
321
+ dir=dir,
322
+ type=LoggerType.EXCEPTION,
323
+ environment=environment,
324
+ service_key=service_key,
325
+ client_key=None,
326
+ level=level,
327
+ google_cloud_logging=google_cloud_logging,
328
+ labels=labels,
329
+ aggregate_file_name=aggregate_file_name,
330
+ inidividual_log=inidividual_log,
331
+ )
332
+
333
+
308
334
  class Middleware(Base):
309
335
  def __init__(
310
336
  self,
@@ -507,6 +533,7 @@ def create(
507
533
  Client,
508
534
  Controller,
509
535
  Database,
536
+ Exception,
510
537
  Middleware,
511
538
  Repository,
512
539
  Service,
@@ -587,6 +614,17 @@ def create(
587
614
  aggregate_file_name=aggregate_file_name,
588
615
  inidividual_log=inidividual_log,
589
616
  )
617
+ elif type is LoggerType.EXCEPTION:
618
+ return Exception(
619
+ dir=dir,
620
+ environment=environment,
621
+ service_key=service_key,
622
+ level=level,
623
+ google_cloud_logging=google_cloud_logging,
624
+ labels=labels,
625
+ aggregate_file_name=aggregate_file_name,
626
+ inidividual_log=inidividual_log,
627
+ )
590
628
  elif type is LoggerType.MIDDLEWARE:
591
629
  return Middleware(
592
630
  dir=dir,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maleo-logging
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: Logging package for MaleoSuite
5
5
  Author-email: Agra Bima Yuda <agra@nexmedis.com>
6
6
  License: Proprietary
@@ -33,7 +33,7 @@ Requires-Dist: grpcio-status>=1.74.0
33
33
  Requires-Dist: identify>=2.6.13
34
34
  Requires-Dist: idna>=3.10
35
35
  Requires-Dist: importlib_metadata>=8.7.0
36
- Requires-Dist: maleo-enums>=0.0.3
36
+ Requires-Dist: maleo-enums>=0.0.6
37
37
  Requires-Dist: maleo-types-base>=0.0.2
38
38
  Requires-Dist: maleo-utils>=0.0.3
39
39
  Requires-Dist: mypy_extensions>=1.1.0
@@ -0,0 +1,10 @@
1
+ maleo/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ maleo/logging/dtos.py,sha256=CqRERlS8TVzj7v7JaDwqNbjfgzFB6BDHBepvjvn-D5Y,984
3
+ maleo/logging/enums.py,sha256=GrM5rC5k8ErR3fcq9W1VrKkTe1B-u5z61lGzqTVukpY,578
4
+ maleo/logging/google.py,sha256=h4ZiPbCCOdSOGdSXOzEFlJyCzNBcsoAzb5w_YtV9ipc,1443
5
+ maleo/logging/logger.py,sha256=9e-P8LZIPF7TV3LLmJyaX8mUUbJ_N27tTxyClncydrc,21227
6
+ maleo_logging-0.0.4.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
7
+ maleo_logging-0.0.4.dist-info/METADATA,sha256=rbEfX647Ceg9RNKtoa0x6V-HsD60kUuO2qSotE0sUVg,2709
8
+ maleo_logging-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ maleo_logging-0.0.4.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
10
+ maleo_logging-0.0.4.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- maleo/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- maleo/logging/dtos.py,sha256=CqRERlS8TVzj7v7JaDwqNbjfgzFB6BDHBepvjvn-D5Y,984
3
- maleo/logging/enums.py,sha256=b-txRvAqdeH80_hjyIYbW9QNGyO1ktikJFEmyIu6v94,550
4
- maleo/logging/google.py,sha256=h4ZiPbCCOdSOGdSXOzEFlJyCzNBcsoAzb5w_YtV9ipc,1443
5
- maleo/logging/logger.py,sha256=PcuntnU2vNNdU1-C357caID7SPZIAJVsmHceIizbGDo,20055
6
- maleo_logging-0.0.2.dist-info/licenses/LICENSE,sha256=aftGsecnk7TWVX-7KW94FqK4Syy6YSZ8PZEF7EcIp3M,2621
7
- maleo_logging-0.0.2.dist-info/METADATA,sha256=vVBgYIEfl7NFinZHKVdjHGJ4d4WA0ju5Samei-gT3hQ,2709
8
- maleo_logging-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- maleo_logging-0.0.2.dist-info/top_level.txt,sha256=3Tpd1siVsfYoeI9FEOJNYnffx_shzZ3wsPpTvz5bljc,6
10
- maleo_logging-0.0.2.dist-info/RECORD,,