Define API Loggers.
Classes
Batch
Batch(logger, client, *, resource=None)
Context manager: collect entries to log via a single API call.
Helper returned by Logger.batch
Name | Description |
logger |
logging_v2.logger.Logger
the logger to which entries will be logged. |
client |
The client to use. |
resource |
Optional[
Monitored resource of the batch, defaults to None, which requires that every entry should have a resource specified. Since the methods used to write entries default the entry's resource to the global resource type, this parameter is only required if explicitly set to None. If no entries' resource are set to None, this parameter will be ignored on the server. |
Logger
Logger(name, client, *, labels=None, resource=None)
Loggers represent named targets for log entries.
See https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.logs