googleapis / googleapis/google-cloud-java

[sdk-platform-java] fix: Modify existing mechanism of logging errors in gax-batching to avoid looped calls

Offen
#12,534 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
lang: java priority: p3 type: feature request
Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
154

Beschreibung

Existing error reporting mechanism in gax-batching uses JUL (`java.util.logger`) to log the errors. This mechanism can lead to the looped calls between the Java client logging library and gax in a case users configure the `com.google.cloud.logging.LoggingHandler` to serve as one of the JUL handlers. In such a case a call to write a log via JUL will land into gax-batching code (via java-logging). If an error arise, the gax-batching will call JUL to write an error log which, in turn, will return the flow back to the same gax-batching code.
To avoid such situation before the first call the current JUL handlers should be enumerated to ensure they do not include `com.google.cloud.logging.LoggingHandler`. If the latter occurs in the list, the error message should be logged to STDERR.

More info about batching modification can be found in the [internal document](http://go/cdpe-ops-log-writing-batching-in-java).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.