# Class Transport (3.16.0)

3.16.0 (latest) 3.15.0 3.13.0 3.12.1 3.11.3 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.1 3.2.5 3.1.2 3.0.0 2.7.2 2.6.0 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.2 1.15.3 1.14.0 1.13.0 1.12.1

    Transport(client, name, resource=Resource(type="global", labels={}), **kwargs)

Base class for Google Cloud Logging handler transports.

Subclasses of `Transport` must have constructors that accept a
client and name object, and must override `send`.

## Methods

### Transport

    Transport(client, name, resource=Resource(type="global", labels={}), **kwargs)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `client` | `` `logging_v2.client.Client` `` The Logging client. |
| `name` | `str` The name of the lgoger. |
| `resource` | `Optional[Resource|dict]` The default monitored resource to associate with logs when not specified |

### close

    close()

Closes the transport and cleans up resources used by it.

This call should be followed up by disowning the transport.

### flush

    flush()

Submit any pending log records.

For blocking/sync transports, this is a no-op.

### send

    send(record, message, **kwargs)

Transport send to be implemented by subclasses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `record` | `logging.LogRecord` Python log record that the handler was called with. |
| `message` | `str or dict` The message from the `LogRecord` after being formatted by the associated log formatters. |