GeezerVison is showing github.com (truncated) — Add async/sync setting to logging handler by michaelbausor · Pull Request #1716 · googleapis/google-cloud-java
Conversation
Two questions:
- I don't like WriteLogMethod much as a setting name. WriteSyncType? Others?
- I am using a switch in write(). Any preference to instead set a callable at construction time? Or something else?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
"instance_id", "instance",
|
|
|
"zone", "us-central1-a"));
|
|
|
LoggingHandler handler = new AsyncLoggingHandler(logName, options, resource);
|
|
|
LoggingHandler handler = new LoggingHandler(logName, options, resource);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
new ByteArrayInputStream(
|
|
|
"com.google.cloud.logging.LoggingHandler.writeLogMethod=SYNC".getBytes()));
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
package com.google.cloud.logging;
|
|
|
|
|
|
public enum WriteLogMethod {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
PTAL. Also, should we have tests to make sure that settings in the properties file are read correctly?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Yes, I think we should have a test for the properties file settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
Synchronicity getSynchronicityProperty(String name, Synchronicity defaultValue) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
package com.google.cloud.logging;
|
|
|
|
|
|
public enum Synchronicity {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.007%) to 81.492% when pulling e7e4fc2 on michaelbausor:async-setting into 33d824d on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage increased (+0.01%) to 81.498% when pulling 7ba4868 on michaelbausor:async-setting into 33d824d on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
import java.util.logging.LogRecord;
|
|
|
import java.util.logging.Logger;
|
|
|
import java.util.logging.SimpleFormatter;
|
|
|
import com.google.cloud.logging.Logging.WriteOption;
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
|
|
package com.google.cloud.logging;
|
|
|
|
|
|
public enum Synchronicity {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
michaelbausor
changed the title
WIP: Add async/sync setting to logging handler
Add async/sync setting to logging handler
Mar 9, 2017
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
|