Skip to content

Commit

Permalink
[SERV-1055] Adjust logging levels (#62)
Browse files Browse the repository at this point in the history
* Adjust logging levels for not founds
* Update dependencies; adjust default log level
  • Loading branch information
ksclarke authored Mar 15, 2024
1 parent d8db26b commit 9da42ab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<freelib.utils.version>3.3.0</freelib.utils.version>
<cidr.ip.version>1.0.1</cidr.ip.version>
<commons.codec.version>1.15</commons.codec.version>
<vertx.version>4.4.6</vertx.version>
<vertx.version>4.4.8</vertx.version>

<!-- Build plugin versions -->
<clean.plugin.version>3.1.0</clean.plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ public void handle(final RoutingContext aContext) {
if (details.failureCode() == Error.NOT_FOUND.ordinal()) {
statusCode = HTTP.NOT_FOUND;
errorMessage = LOGGER.getMessage(MessageCodes.AUTH_004, id);
LOGGER.info(MessageCodes.AUTH_006, request.method(), request.absoluteURI(), statusCode);
} else {
statusCode = HTTP.INTERNAL_SERVER_ERROR;
errorMessage = LOGGER.getMessage(MessageCodes.AUTH_005);
LOGGER.error(MessageCodes.AUTH_006, request.method(), request.absoluteURI(), details.getMessage());
}

errorData = new JsonObject() //
.put(ResponseJsonKeys.ERROR, Error.values()[details.failureCode()]) //
.put(ResponseJsonKeys.MESSAGE, errorMessage);

response.setStatusCode(statusCode).end(errorData.encodePrettily());

LOGGER.error(MessageCodes.AUTH_006, request.method(), request.absoluteURI(), details.getMessage());
} else {
aContext.fail(error);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void handle(final RoutingContext aContext) {
response.setStatusCode(HTTP.BAD_REQUEST).end(jsonWrapper.encodePrettily());
}

LOGGER.error(MessageCodes.AUTH_006, request.method(), request.absoluteURI(), error.getMessage());
LOGGER.debug(MessageCodes.AUTH_006, request.method(), request.absoluteURI(), error.getMessage());
} else {
aContext.next();
LOGGER.error(MessageCodes.AUTH_010, error.toString());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</logger>

<!-- Default logging level for everything else -->
<root level="DEBUG">
<root level="WARN">
<appender-ref ref="STDOUT" />
<if condition='property("FLUENCY_ENABLED").equals("true")'>
<then>
Expand Down

0 comments on commit 9da42ab

Please sign in to comment.