-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: add writeSynchronicity flag to appender configuration #542
Conversation
add new adapter configuration to allow setting writeSynchronicity
remove debug prints add option description into class javadoc setup default value of the instance
* | ||
* @param log flag | ||
*/ | ||
public void setWriteSynchronicity(String flag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should this be enum instead of string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter is a value of the enum. There is no simple way to define specific type for logback appender parameters in the configuration. The value is parsed and in a case of failure the fallback is to the default value (ASYNC).
@@ -161,6 +181,12 @@ String getLogName() { | |||
return (log != null) ? log : "java.log"; | |||
} | |||
|
|||
public String getWriteSynchronicity() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not returning the enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be symetric with setWriteSynchronicity()
🤖 I have created a release \*beep\* \*boop\* --- ## [0.122.0](https://www.github.com/googleapis/java-logging-logback/compare/v0.121.14...v0.122.0) (2021-09-27) ### Features * add writeSynchronicity flag to appender configuration ([#542](https://www.github.com/googleapis/java-logging-logback/issues/542)) ([65ab6f8](https://www.github.com/googleapis/java-logging-logback/commit/65ab6f8dfbfe9f28538b905db58aadeae0182276)) ### Dependencies * update dependency com.google.cloud:google-cloud-logging to v3.1.2 ([#543](https://www.github.com/googleapis/java-logging-logback/issues/543)) ([288a368](https://www.github.com/googleapis/java-logging-logback/commit/288a36884becc81ad5d79548162e401b6035b63b)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#547](https://www.github.com/googleapis/java-logging-logback/issues/547)) ([1c745c3](https://www.github.com/googleapis/java-logging-logback/commit/1c745c34fc081d2b00d196ec8091b3d0ecab8937)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Adds the writeSynchronicity flag to control synchronous writing of the log entries by the logging appender.
It is done as a partial work on resolving #537 .