Skip to content

Commit b1c7873

Browse files
authored
reduce info log in code cell output (#60)
1 parent abbe104 commit b1c7873

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

spanner_graphs/cloud_database.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from google.cloud.spanner_v1 import JsonObject
2525
from google.api_core.client_options import ClientOptions
2626
from google.cloud.spanner_v1.types import StructType, Type, TypeCode
27+
import logging
2728
import pydata_google_auth
2829

2930
from spanner_graphs.database import SpannerDatabase, MockSpannerDatabase, SpannerQueryResult, SpannerFieldInfo
@@ -44,7 +45,9 @@ def __init__(self, project_id: str, instance_id: str,
4445
self.client = spanner.Client(
4546
project=project_id, credentials=credentials, client_options=ClientOptions(quota_project_id=project_id))
4647
self.instance = self.client.instance(instance_id)
47-
self.database = self.instance.database(database_id)
48+
logger = logging.getLogger("spanner_graphs")
49+
logger.setLevel(logging.CRITICAL)
50+
self.database = self.instance.database(database_id, logger=logger)
4851
self.schema_json: Any | None = None
4952

5053
def __repr__(self) -> str:

0 commit comments

Comments
 (0)