Module logger (3.5.0)

Stay organized with collections Save and categorize content based on your preferences.

Define API Loggers.



Batch(logger, client, *, resource=None)

Context manager: collect entries to log via a single API call.

Helper returned by Logger.batch

logger logging_v2.logger.Logger

the logger to which entries will be logged.

client logging_V2.client.Cilent

The client to use.

resource Optional[logging_v2.resource.Resource]

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(name, client, *, labels=None, resource=None)

Loggers represent named targets for log entries.