Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Commit

Permalink
Fixed logger for production.
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabh9 committed Jan 5, 2017
1 parent 8933df8 commit e0a6f5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/controllers/IncomingDataController.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ public CompletionStage<Result> index() {
case Event.PLUGIN_INSTALL:
log.debug("Installation event received");
return complete(executeInstallationEvents(event, json, messages));
case Event.PLUGIN_UNINSTALL:
log.warn("Ignoring event {}.", event);
default:
log.warn("Ignoring event {}.");
log.warn("Ignoring event {}.", event);
return complete(badRequest(ErrorUtil.toJson(BAD_REQUEST, messages.at(MessageKey.NOT_SUBSCRIBED))));
}
} else {
Expand Down Expand Up @@ -132,7 +134,7 @@ private Result executeInstallationEvents(String event, JsonNode json, Messages m
return updateHelper.updateConfiguration(data, messages);
}
} catch (Exception e) {
log.debug("Missing or invalid data object.", e);
log.error("Missing or invalid data object.", e);
Map<String, String> errorMessages = new HashMap<>();
errorMessages.put("payload.data", messages.at(MessageKey.MISSING_PAYLOAD_DATA));
return badRequest(ErrorUtil.toJson(BAD_REQUEST, messages.at(MessageKey.INVALID_JSON), errorMessages));
Expand Down
6 changes: 3 additions & 3 deletions conf/logback-prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<configuration>

<logger name="play" level="INFO"/>
<logger name="application" level="INFO"/>
<logger name="controllers" level="INFO"/>
<logger name="daos" level="INFO"/>
<logger name="application" level="debug"/>
<logger name="controllers" level="debug"/>
<logger name="daos" level="debug"/>


<!-- Off these ones as they are annoying, and anyway we manage configuration ourselves -->
Expand Down

0 comments on commit e0a6f5f

Please sign in to comment.