-
Notifications
You must be signed in to change notification settings - Fork 413
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
Gh680 jsonproviders no auto start #681
Conversation
…tring Issue #680: no auto-start of JsonProviders - remove Lifecycle from the JsonProvider interface to prevent Logstash from auto-starting the provider - declare the start/stop method initially defined by the Lifecycle interface in the JsonProvider interface - now that start() is called only once, parse the JSON string during start() Issue #679: remaining characters after reading JSON string - raise an error if some characters remain after reading a JsonNode out of the string
src/main/java/net/logstash/logback/composite/AbstractPatternJsonProvider.java
Show resolved
Hide resolved
src/main/java/net/logstash/logback/composite/JsonReadingUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/net/logstash/logback/composite/JsonReadingUtils.java
Outdated
Show resolved
Hide resolved
src/test/java/net/logstash/logback/composite/GlobalCustomFieldsJsonProviderTest.java
Show resolved
Hide resolved
* | ||
* @param jsonFactory the {@link JsonFactory} from which to obtain a {@link JsonParser} to read the JSON string. | ||
* @param json the JSON string to read | ||
* @param readFully whether to throw a {@link JsonParseException} when the input is not fully read. |
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.
I don't see any places in where readFully is ever false. The code and tests could be simplified a bit since that functionality is not needed. It can always be added in the future if it is ever needed.
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.
True... do you mean to keep only the readFully...
methods ?
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.
yes
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.
ok - done.
8e7c02d
to
926c65a
Compare
These methods will be re-introduced when needed.
Close #680: no auto-start of JsonProviders
Close #679: remaining characters after reading JSON string