feat: add writeSynchronicity flag to appender configuration#542
Merged
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
simonz130
reviewed
Sep 16, 2021
| * | ||
| * @param log flag | ||
| */ | ||
| public void setWriteSynchronicity(String flag) { |
There was a problem hiding this comment.
Nit: should this be enum instead of string?
Contributor
Author
There was a problem hiding this comment.
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).
| return (log != null) ? log : "java.log"; | ||
| } | ||
|
|
||
| public String getWriteSynchronicity() { |
Contributor
Author
There was a problem hiding this comment.
It should be symetric with setWriteSynchronicity()
simonz130
approved these changes
Sep 17, 2021
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Sep 27, 2021
🤖 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 .