Skip to content

Commit 7b02d26

Browse files
committed
address PR feedback
1 parent 9ecba20 commit 7b02d26

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

google/api_core/client_logging.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@
1212
"httpRequest",
1313
"rpcName",
1414
"serviceName",
15+
"credentialsType",
16+
"credentialInfo",
17+
"universeDomain",
18+
"request",
19+
"response",
20+
"metadata",
21+
"retryAttempt",
1522
] # Additional fields to be Logged.
1623

1724

1825
# TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
19-
def logger_configured(logger):
26+
def logger_configured(logger) -> bool:
2027
return (
2128
logger.handlers != [] or logger.level != logging.NOTSET or not logger.propagate
2229
)
@@ -55,7 +62,7 @@ def configure_defaults(logger):
5562

5663

5764
# TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
58-
def setup_logging(scopes=""):
65+
def setup_logging(scopes: str=""):
5966

6067
# only returns valid logger scopes (namespaces)
6168
# this list has at most one element.
@@ -78,7 +85,7 @@ def setup_logging(scopes=""):
7885
class StructuredLogFormatter(logging.Formatter):
7986
# TODO(https://github.com/googleapis/python-api-core/issues/761): ensure that additional fields such as
8087
# function name, file name, and line no. appear in a log output.
81-
def format(self, record):
88+
def format(self, record: logging.LogRecord):
8289
log_obj = {
8390
"timestamp": self.formatTime(record),
8491
"severity": record.levelname,

0 commit comments

Comments
 (0)