trinodb / trino-python-client

Python client for Trino
Apache License 2.0
327 stars 163 forks source link

Allow to set different log level #432

Closed guerremdq closed 8 months ago

guerremdq commented 9 months ago

Description

Allow users to set a different log level for trino client.

Credits go to @mb-m

john-bodley commented 9 months ago

@guerremdq I sense @hashhar or @mdesmet are likely better reviewers, so I added them and removed myself.

hashhar commented 8 months ago

This was addressed via https://github.com/trinodb/trino-python-client/pull/434. You can now change log levels using the standard logging mechanism.

trino_logger = logging.getLogger("trino")
trino_logger.setLevel(DEBUG)

The loggers are named same as the module name. trino is the root logger.