Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita157d8c

Browse files
committed
address PR feedback
1 parent8514389 commita157d8c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

‎google/api_core/client_logging.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@
1414
"httpRequest",
1515
"rpcName",
1616
"serviceName",
17+
"credentialsType",
18+
"credentialInfo",
19+
"universeDomain",
20+
"request",
21+
"response",
22+
"metadata",
23+
"retryAttempt",
1724
]# Additional fields to be Logged.
1825

1926

20-
# TODO(https://github.com/googleapis/python-api-core/issues/763): Expand documentation.
21-
deflogger_configured(logger):
27+
deflogger_configured(logger)->bool:
2228
"""Determines whether `logger` has non-default configuration
2329
2430
Args:
@@ -32,7 +38,6 @@ def logger_configured(logger):
3238
)
3339

3440

35-
# TODO(https://github.com/googleapis/python-api-core/issues/763): Expand documentation.
3641
definitialize_logging():
3742
"""Initializes "google" loggers, partly based on the environment variable
3843
@@ -55,7 +60,6 @@ def initialize_logging():
5560
_LOGGING_INITIALIZED=True
5661

5762

58-
# TODO(https://github.com/googleapis/python-api-core/issues/763): Expand documentation.
5963
defparse_logging_scopes(scopes:Optional[str]=None)->List[str]:
6064
"""Returns a list of logger names.
6165
@@ -76,7 +80,6 @@ def parse_logging_scopes(scopes: Optional[str] = None) -> List[str]:
7680
returnnamespaces
7781

7882

79-
# TODO(https://github.com/googleapis/python-api-core/issues/763): Expand documentation.
8083
defconfigure_defaults(logger):
8184
"""Configures `logger` to emit structured info to stdout."""
8285
ifnotlogger_configured(logger):
@@ -88,8 +91,7 @@ def configure_defaults(logger):
8891
logger.addHandler(console_handler)
8992

9093

91-
# TODO(https://github.com/googleapis/python-api-core/issues/763): Expand documentation.
92-
defsetup_logging(scopes=""):
94+
defsetup_logging(scopes:str=""):
9395
"""Sets up logging for the specified `scopes`.
9496
9597
If the loggers specified in `scopes` have not been previously
@@ -122,11 +124,11 @@ def setup_logging(scopes=""):
122124
base_logger.propagate=False
123125

124126

125-
# TODO(https://github.com/googleapis/python-api-core/issues/763):Add documentation.
127+
# TODO(https://github.com/googleapis/python-api-core/issues/763):Expand documentation.
126128
classStructuredLogFormatter(logging.Formatter):
127129
# TODO(https://github.com/googleapis/python-api-core/issues/761): ensure that additional fields such as
128130
# function name, file name, and line no. appear in a log output.
129-
defformat(self,record):
131+
defformat(self,record:logging.LogRecord):
130132
log_obj= {
131133
"timestamp":self.formatTime(record),
132134
"severity":record.levelname,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp