1515] # Additional fields to be Logged.
1616
1717
18+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
1819def logger_configured (logger ):
1920 return (
2021 logger .handlers != [] or logger .level != logging .NOTSET or not logger .propagate
2122 )
2223
2324
25+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
2426def initialize_logging ():
2527 global _LOGGING_INITIALIZED
2628 if _LOGGING_INITIALIZED :
@@ -30,6 +32,7 @@ def initialize_logging():
3032 _LOGGING_INITIALIZED = True
3133
3234
35+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
3336def parse_logging_scopes (scopes : Optional [str ] = None ) -> List [str ]:
3437 if not scopes :
3538 return []
@@ -40,6 +43,7 @@ def parse_logging_scopes(scopes: Optional[str] = None) -> List[str]:
4043 return namespaces
4144
4245
46+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
4347def configure_defaults (logger ):
4448 if not logger_configured (logger ):
4549 console_handler = logging .StreamHandler ()
@@ -50,6 +54,7 @@ def configure_defaults(logger):
5054 logger .addHandler (console_handler )
5155
5256
57+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
5358def setup_logging (scopes = "" ):
5459
5560 # only returns valid logger scopes (namespaces)
@@ -69,6 +74,7 @@ def setup_logging(scopes=""):
6974 base_logger .propagate = False
7075
7176
77+ # TODO(https://github.com/googleapis/python-api-core/issues/763): Add documentation.
7278class StructuredLogFormatter (logging .Formatter ):
7379 # TODO(https://github.com/googleapis/python-api-core/issues/761): ensure that additional fields such as
7480 # function name, file name, and line no. appear in a log output.
0 commit comments