pub struct LoggingServiceV2 { /* private fields */ }Expand description
Implements a client for the Cloud Logging API.
§Example
let client = LoggingServiceV2::builder().build().await?;
// use `client` to make requests to the Cloud Logging API.§Service Description
Service for ingesting and querying logs.
§Configuration
To configure LoggingServiceV2 use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://logging.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
LoggingServiceV2 holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap LoggingServiceV2 in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl LoggingServiceV2
impl LoggingServiceV2
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for LoggingServiceV2.
let client = LoggingServiceV2::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: LoggingServiceV2 + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: LoggingServiceV2 + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn delete_log(&self) -> DeleteLog
pub fn delete_log(&self) -> DeleteLog
Deletes all the log entries in a log for the _Default Log Bucket. The log reappears if it receives new entries. Log entries written shortly before the delete operation might not be deleted. Entries received after the delete operation with a timestamp before the operation will be deleted.
Sourcepub fn write_log_entries(&self) -> WriteLogEntries
pub fn write_log_entries(&self) -> WriteLogEntries
Writes log entries to Logging. This API method is the only way to send log entries to Logging. This method is used, directly or indirectly, by the Logging agent (fluentd) and all logging libraries configured to use Logging. A single request may contain log entries for a maximum of 1000 different resources (projects, organizations, billing accounts or folders)
Sourcepub fn list_log_entries(&self) -> ListLogEntries
pub fn list_log_entries(&self) -> ListLogEntries
Lists log entries. Use this method to retrieve log entries that originated from a project/folder/organization/billing account. For ways to export log entries, see Exporting Logs.
Sourcepub fn list_monitored_resource_descriptors(
&self,
) -> ListMonitoredResourceDescriptors
pub fn list_monitored_resource_descriptors( &self, ) -> ListMonitoredResourceDescriptors
Lists the descriptors for monitored resource types used by Logging.
Sourcepub fn list_logs(&self) -> ListLogs
pub fn list_logs(&self) -> ListLogs
Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for LoggingServiceV2
impl Clone for LoggingServiceV2
Source§fn clone(&self) -> LoggingServiceV2
fn clone(&self) -> LoggingServiceV2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more