omnata-plugin-runtime 0.1.4__py3-none-any.whl → 0.1.6__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.
- omnata_plugin_runtime/logging.py +7 -2
- {omnata_plugin_runtime-0.1.4.dist-info → omnata_plugin_runtime-0.1.6.dist-info}/METADATA +1 -1
- {omnata_plugin_runtime-0.1.4.dist-info → omnata_plugin_runtime-0.1.6.dist-info}/RECORD +5 -5
- {omnata_plugin_runtime-0.1.4.dist-info → omnata_plugin_runtime-0.1.6.dist-info}/LICENSE +0 -0
- {omnata_plugin_runtime-0.1.4.dist-info → omnata_plugin_runtime-0.1.6.dist-info}/WHEEL +0 -0
omnata_plugin_runtime/logging.py
CHANGED
@@ -10,7 +10,7 @@ import pandas
|
|
10
10
|
from snowflake.snowpark import Session
|
11
11
|
from pydantic import ValidationError
|
12
12
|
|
13
|
-
class CustomLogger(logging.
|
13
|
+
class CustomLogger(logging.getLoggerClass()):
|
14
14
|
"""
|
15
15
|
Custom logger that can handle pydantic validation errors.
|
16
16
|
Without this, you get "Object of type ErrorWrapper is not JSON serializable"
|
@@ -18,7 +18,12 @@ class CustomLogger(logging.Logger):
|
|
18
18
|
"""
|
19
19
|
def error(self, msg, *args, **kwargs):
|
20
20
|
if isinstance(msg, ValidationError):
|
21
|
-
|
21
|
+
# If the exc_info or stack_info flags are set, unset them and manually
|
22
|
+
# add the error information to the log message.
|
23
|
+
exc_info = kwargs.pop('exc_info', False)
|
24
|
+
stack_info = kwargs.pop('stack_info', False)
|
25
|
+
if exc_info or stack_info:
|
26
|
+
msg = f"{msg.errors()} (originally raised at {msg.__traceback__.tb_frame.f_code.co_filename}:{msg.__traceback__.tb_lineno})"
|
22
27
|
super().error(msg, *args, **kwargs)
|
23
28
|
|
24
29
|
class OmnataPluginLogHandler(logging.handlers.BufferingHandler):
|
@@ -2,12 +2,12 @@ omnata_plugin_runtime/__init__.py,sha256=piQOo_Y0VwAdP2nME0J53yey06In4MgfBFbH7R1
|
|
2
2
|
omnata_plugin_runtime/api.py,sha256=iLEwFTVvo53OJ4b_W81P7Eg8AlPPaXZ9fPcEP6qNg7o,3277
|
3
3
|
omnata_plugin_runtime/configuration.py,sha256=ApmDhTG7TqURiQ5VCkfP8QY8rT5K9pQIdKi6qJurDnQ,29524
|
4
4
|
omnata_plugin_runtime/forms.py,sha256=LZwztBBzoKdvsSccZ0ZKC7Edkml5e6buTpgJKkC1VTc,12646
|
5
|
-
omnata_plugin_runtime/logging.py,sha256=
|
5
|
+
omnata_plugin_runtime/logging.py,sha256=S7NNcPy1YPjnq9xSwJpePzEVuuTfChZeOi-aVHNxiZ8,4387
|
6
6
|
omnata_plugin_runtime/omnata_plugin.py,sha256=7pvfQ6CLghmy1NzaNUwPSDZ44vZnZKAxfvCR8RiYMIM,64614
|
7
7
|
omnata_plugin_runtime/plugin_entrypoints.py,sha256=VvnypyMQADS9N8EaLUVZJvRpHlU2s_wFB0NMsM9uVSo,18397
|
8
8
|
omnata_plugin_runtime/rate_limiting.py,sha256=wxjKF26cMyCRdkCdTytC-mXwJFgsMze-PJttiND9c8g,10078
|
9
9
|
omnata_plugin_runtime/record_transformer.py,sha256=oDUHurMQl6ixsltBaZf6ngPxtoizcaS21LuxKMxlaxY,2611
|
10
|
-
omnata_plugin_runtime-0.1.
|
11
|
-
omnata_plugin_runtime-0.1.
|
12
|
-
omnata_plugin_runtime-0.1.
|
13
|
-
omnata_plugin_runtime-0.1.
|
10
|
+
omnata_plugin_runtime-0.1.6.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
|
11
|
+
omnata_plugin_runtime-0.1.6.dist-info/METADATA,sha256=XktaQreDkqW_CNY0OYnm6Ec2G0od0iX0gW6j6LjPmwU,852
|
12
|
+
omnata_plugin_runtime-0.1.6.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
13
|
+
omnata_plugin_runtime-0.1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|