Package com.google.cloud.logging.testing (3.8.0)

A testing helper for Cloud Logging.

A simple usage example:

Before the test:


 RemoteLoggingHelper helper = RemoteLoggingHelper.create();
 Logging logging = helper.getOptions().getService();
 

Format resource names to avoid name clashes:


 String metricName = RemoteLoggingHelper.formatForTest("test-metric");
 

See Also: Google Cloud Java tools for testing

Classes

RemoteLoggingHelper

Utility to create a remote logging configuration for testing. Logging options can be obtained via the #getOptions() method. Returned options have custom LoggingOptions#getRetrySettings(): RetrySettings#getMaxRetryDelay() is 30000, RetrySettings#getTotalTimeout() is 120000 and RetrySettings#getInitialRetryDelay() is 250.

Exceptions

RemoteLoggingHelper.LoggingHelperException