Skip to content

Commit

Permalink
Try to deserialize/serialize threshold as a string
Browse files Browse the repository at this point in the history
  • Loading branch information
arteam committed Jul 27, 2017
1 parent b8b1bcc commit 26e2133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -126,13 +126,13 @@ public void setDiscardingThreshold(int discardingThreshold) {
}

@JsonProperty
public Level getThreshold() {
return threshold;
public String getThreshold() {
return threshold.toString();
}

@JsonProperty
public void setThreshold(Level threshold) {
this.threshold = threshold;
public void setThreshold(String threshold) {
this.threshold = DefaultLoggingFactory.toLevel(threshold);
}

@JsonProperty
Expand Down
Expand Up @@ -278,7 +278,7 @@ private Logger configureLoggers(String name) {
return root;
}

private static Level toLevel(@Nullable String text) {
static Level toLevel(@Nullable String text) {
// required because YAML maps "off" to a boolean false
if ("false".equalsIgnoreCase(text)) {
// required because YAML maps "off" to a boolean false
Expand Down

0 comments on commit 26e2133

Please sign in to comment.