-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.next major: breaking changethis is a change that we should wait to bundle into the next major versionthis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
LoggingOptions.getDefaultInstance()
always returns a new object:
public static LoggingOptions getDefaultInstance() {
return newBuilder().build();
}
This is very misleading, because the method name suggests it will return the same instance.
Consequences are that Logging
instance is not shared among handlers etc. if we use LoggingOptions.getDefaultInstance()
to pass the options, without saving them to a variable.
In fact, our codebase had LoggingOptions.getDefaultInstance().service
in a few places, and a new client was always created as a result.
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.next major: breaking changethis is a change that we should wait to bundle into the next major versionthis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.