Expand description
An implemention of slog::Drain for logging to Google Cloud.
§Usage
Warning: Currently, this library only works in the context of workload identity.
The slog_google drain creates log entries compatible with Google Cloud Logging.
Depending on how you want to ship these logs to the Google Logging API, you can choose from one of the available build methods.
Start by configuring the Logger with the builder (Builder) and selecting the appropriate build method based on your shipping requirements:
build(): ReceivesWriteLogEntriesover a channel and allows you to handle the transportation manually.build_with_async_shipper(): Offloads transportation to theShipperand its sync-async Bridge in an async context. (Requires theshipperfeature.)
The builder supports several with_* methods to customize the log message format,
particularly the default labels attached to log entries.
Modules§
- error
- slog-google Error types
- logger
- The
slog::DrainImplementation of the slog Drain for Google Cloud Logging