|
38 | 38 | class BoilingData: |
39 | 39 | """Run SQL with BoilingData and local DuckDB""" |
40 | 40 |
|
41 | | - def __init__(self, log_level=logging.DEBUG): |
| 41 | + def __init__(self, log_level=logging.INFO): |
42 | 42 | logging.basicConfig() |
43 | 43 | self.log_level = log_level |
44 | 44 | self.logger = logging.getLogger("BoilingData") |
@@ -116,7 +116,7 @@ async def execute(self, sql, cb=None, force_boiling=False): |
116 | 116 | class BoilingDataConnection: |
117 | 117 | """Create authenticated WebSocket connection to BoilingData""" |
118 | 118 |
|
119 | | - def __init__(self, region=AWS_REGION, log_level=logging.ERROR): |
| 119 | + def __init__(self, region=AWS_REGION, log_level=logging.INFO): |
120 | 120 | self.log_level = log_level |
121 | 121 | self.logger = logging.getLogger("BoilingDataConnection") |
122 | 122 | self.logger.setLevel(self.log_level) |
@@ -207,6 +207,13 @@ def _on_msg(self, ws_app, data): |
207 | 207 | log_level = msg.get("logLevel") |
208 | 208 | if log_level == "ERROR": |
209 | 209 | raise Exception(msg.get("logMessage")) |
| 210 | + if log_level == "INFO": |
| 211 | + self.logger.info(msg.get("logMessage")) |
| 212 | + if msg_type == "INFO" and self.log_level == "INFO": |
| 213 | + self.logger.info(msg.get("info")) |
| 214 | + if msg_type == "LAMBDA_EVENT": |
| 215 | + lambda_event = msg.get("lambdaEvent") |
| 216 | + self.logger.info(lambda_event) |
210 | 217 | if msg_type != "DATA": |
211 | 218 | return |
212 | 219 | req = self.requests.get(reqId) |
|
0 commit comments