Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate logging with updated class names #1708

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.cloud.logging.spi.DefaultLoggingRpc;
import com.google.cloud.logging.spi.LoggingRpc;
import com.google.cloud.logging.spi.LoggingRpcFactory;
import com.google.cloud.logging.spi.v2.LoggingServiceV2Settings;
import com.google.cloud.logging.spi.v2.LoggingSettings;
import com.google.common.collect.ImmutableSet;

import java.io.IOException;
Expand All @@ -32,8 +32,8 @@ public class LoggingOptions extends GrpcServiceOptions<Logging, LoggingRpc, Logg
private static final long serialVersionUID = -5117984564582881668L;
private static final String LOGGING_SCOPE = "https://www.googleapis.com/auth/logging.admin";
private static final Set<String> SCOPES = ImmutableSet.of(LOGGING_SCOPE);
private static final String DEFAULT_HOST = LoggingServiceV2Settings.getDefaultServiceAddress()
+ ':' + LoggingServiceV2Settings.getDefaultServicePort();
private static final String DEFAULT_HOST = LoggingSettings.getDefaultServiceAddress()
+ ':' + LoggingSettings.getDefaultServicePort();

public static class DefaultLoggingFactory implements LoggingFactory {
private static final LoggingFactory INSTANCE = new DefaultLoggingFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
import com.google.cloud.NoCredentials;
import com.google.cloud.logging.LoggingException;
import com.google.cloud.logging.LoggingOptions;
import com.google.cloud.logging.spi.v2.ConfigServiceV2Client;
import com.google.cloud.logging.spi.v2.ConfigServiceV2Settings;
import com.google.cloud.logging.spi.v2.LoggingServiceV2Client;
import com.google.cloud.logging.spi.v2.LoggingServiceV2Settings;
import com.google.cloud.logging.spi.v2.MetricsServiceV2Client;
import com.google.cloud.logging.spi.v2.MetricsServiceV2Settings;
import com.google.cloud.logging.spi.v2.ConfigClient;
import com.google.cloud.logging.spi.v2.ConfigSettings;
import com.google.cloud.logging.spi.v2.LoggingClient;
import com.google.cloud.logging.spi.v2.LoggingSettings;
import com.google.cloud.logging.spi.v2.MetricsClient;
import com.google.cloud.logging.spi.v2.MetricsSettings;
import com.google.logging.v2.CreateLogMetricRequest;
import com.google.logging.v2.CreateSinkRequest;
import com.google.logging.v2.DeleteLogMetricRequest;
Expand Down Expand Up @@ -71,9 +71,9 @@

public class DefaultLoggingRpc implements LoggingRpc {

private final ConfigServiceV2Client configClient;
private final LoggingServiceV2Client loggingClient;
private final MetricsServiceV2Client metricsClient;
private final ConfigClient configClient;
private final LoggingClient loggingClient;
private final MetricsClient metricsClient;
private final ScheduledExecutorService executor;
private final ProviderManager providerManager;
private final ExecutorFactory<ScheduledExecutorService> executorFactory;
Expand Down Expand Up @@ -127,21 +127,24 @@ public DefaultLoggingRpc(LoggingOptions options) throws IOException {
.setExecutorProvider(executorProvider)
.build();
UnaryCallSettings.Builder callSettingsBuilder = internalOptions.getApiCallSettings();
ConfigServiceV2Settings.Builder confBuilder = ConfigServiceV2Settings.defaultBuilder()
.setExecutorProvider(providerManager)
.setChannelProvider(providerManager)
.applyToAllUnaryMethods(callSettingsBuilder);
LoggingServiceV2Settings.Builder logBuilder = LoggingServiceV2Settings.defaultBuilder()
.setExecutorProvider(providerManager)
.setChannelProvider(providerManager)
.applyToAllUnaryMethods(callSettingsBuilder);
MetricsServiceV2Settings.Builder metricsBuilder = MetricsServiceV2Settings.defaultBuilder()
.setExecutorProvider(providerManager)
.setChannelProvider(providerManager)
.applyToAllUnaryMethods(callSettingsBuilder);
configClient = ConfigServiceV2Client.create(confBuilder.build());
loggingClient = LoggingServiceV2Client.create(logBuilder.build());
metricsClient = MetricsServiceV2Client.create(metricsBuilder.build());
ConfigSettings.Builder confBuilder =
ConfigSettings.defaultBuilder()
.setExecutorProvider(providerManager)
.setChannelProvider(providerManager)
.applyToAllUnaryMethods(callSettingsBuilder);