You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library has support to enable logging for debugging and monitoring purposes. Note that logs may contain sensitive information and care should be
56
+
taken to restrict access to the logs if they are saved, whether it be on local storage or Google Cloud Logging.
57
+
58
+
Users must **explicitly opt-in** to enable logging by configuring the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable with a valid logging scope.
59
+
60
+
A logging scope is a namespace that begins with :code:`google`.
61
+
62
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
63
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
64
+
65
+
**NOTE**: If an invalid logging scope is configured, we do not act on the corresponding logger.
66
+
67
+
To set a handler that applies to all Google-based loggers:
:code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` allows users to enable or disable logs by configuring a log system; it does not let them configure log levels, handlers, formatters, etc.
80
+
81
+
Loggers so configured will handle log messages at level DEBUG or higher, outputting them to stderr. The default log format for these log messages is structured log format.
82
+
83
+
Alternatively, users can define and configure a valid logging scope using the standard logging library.
84
+
85
+
A typical use case is the following, which defines a handler that applies to all Google-based loggers:
This library has support to enable logging for debugging and monitoring purposes. Note that logs may contain sensitive information and care should be
56
+
taken to restrict access to the logs if they are saved, whether it be on local storage or Google Cloud Logging.
57
+
58
+
Users must **explicitly opt-in** to enable logging by configuring the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable with a valid logging scope.
59
+
60
+
A logging scope is a namespace that begins with :code:`google`.
61
+
62
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
63
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
64
+
65
+
**NOTE**: If an invalid logging scope is configured, we do not act on the corresponding logger.
66
+
67
+
To set a handler that applies to all Google-based loggers:
:code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` allows users to enable or disable logs by configuring a log system; it does not let them configure log levels, handlers, formatters, etc.
80
+
81
+
Loggers so configured will handle log messages at level DEBUG or higher, outputting them to stderr. The default log format for these log messages is structured log format.
82
+
83
+
Alternatively, users can define and configure a valid logging scope using the standard logging library.
84
+
85
+
A typical use case is the following, which defines a handler that applies to all Google-based loggers:
This library has support to enable logging for debugging and monitoring purposes. Note that logs may contain sensitive information and care should be
56
+
taken to restrict access to the logs if they are saved, whether it be on local storage or Google Cloud Logging.
57
+
58
+
Users must **explicitly opt-in** to enable logging by configuring the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable with a valid logging scope.
59
+
60
+
A logging scope is a namespace that begins with :code:`google`.
61
+
62
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
63
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
64
+
65
+
**NOTE**: If an invalid logging scope is configured, we do not act on the corresponding logger.
66
+
67
+
To set a handler that applies to all Google-based loggers:
:code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` allows users to enable or disable logs by configuring a log system; it does not let them configure log levels, handlers, formatters, etc.
80
+
81
+
Loggers so configured will handle log messages at level DEBUG or higher, outputting them to stderr. The default log format for these log messages is structured log format.
82
+
83
+
Alternatively, users can define and configure a valid logging scope using the standard logging library.
84
+
85
+
A typical use case is the following, which defines a handler that applies to all Google-based loggers:
This library has support to enable logging for debugging and monitoring purposes. Note that logs may contain sensitive information and care should be
56
+
taken to restrict access to the logs if they are saved, whether it be on local storage or Google Cloud Logging.
57
+
58
+
Users must **explicitly opt-in** to enable logging by configuring the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable with a valid logging scope.
59
+
60
+
A logging scope is a namespace that begins with :code:`google`.
61
+
62
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
63
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
64
+
65
+
**NOTE**: If an invalid logging scope is configured, we do not act on the corresponding logger.
66
+
67
+
To set a handler that applies to all Google-based loggers:
:code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` allows users to enable or disable logs by configuring a log system; it does not let them configure log levels, handlers, formatters, etc.
80
+
81
+
Loggers so configured will handle log messages at level DEBUG or higher, outputting them to stderr. The default log format for these log messages is structured log format.
82
+
83
+
Alternatively, users can define and configure a valid logging scope using the standard logging library.
84
+
85
+
A typical use case is the following, which defines a handler that applies to all Google-based loggers:
This library has support to enable logging for debugging and monitoring purposes. Note that logs may contain sensitive information and care should be
56
+
taken to restrict access to the logs if they are saved, whether it be on local storage or Google Cloud Logging.
57
+
58
+
Users must **explicitly opt-in** to enable logging by configuring the `GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable with a valid logging scope.
59
+
60
+
A logging scope is a namespace that begins with :code:`google`.
61
+
62
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
63
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
64
+
65
+
**NOTE**: If an invalid logging scope is configured, we do not act on the corresponding logger.
66
+
67
+
To set a handler that applies to all Google-based loggers:
:code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` allows users to enable or disable logs by configuring a log system; it does not let them configure log levels, handlers, formatters, etc.
80
+
81
+
Loggers so configured will handle log messages at level DEBUG or higher, outputting them to stderr. The default log format for these log messages is structured log format.
82
+
83
+
Alternatively, users can define and configure a valid logging scope using the standard logging library.
84
+
85
+
A typical use case is the following, which defines a handler that applies to all Google-based loggers:
0 commit comments