Permalink
Browse files

Error in log statement (#829)

* Error in log statement

Log line did not print the message correctly

* added semicolon

forgot semi-colon

* Error in log statement

* incorporated feedback GalRogozinski
* the new signature of log.info is possible since SLF4J 1.6.0. see also https://www.slf4j.org/faq.html#paramException

* Error in log statement

forgot import
  • Loading branch information...
gjeee authored and GalRogozinski committed Aug 12, 2018
1 parent 5566cbc commit bf8293ca817696992c340fa91e2f71a8e628356d
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/com/iota/iri/service/API.java
@@ -51,6 +51,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.security.InvalidAlgorithmParameterException;
import static io.undertow.Handlers.path;
@@ -362,8 +363,11 @@ private AbstractResponse process(final String requestString, InetSocketAddress s
} catch (final ValidationException e) {
log.info("API Validation failed: " + e.getLocalizedMessage());
return ErrorResponse.create(e.getLocalizedMessage());
} catch (final InvalidAlgorithmParameterException e) {
log.info("API InvalidAlgorithmParameter passed: " + e.getLocalizedMessage());
return ErrorResponse.create(e.getLocalizedMessage());
} catch (final Exception e) {
log.error("API Exception: ", e);
log.error("API Exception: {}", e.getLocalizedMessage(), e);
return ExceptionResponse.create(e.getLocalizedMessage());
}
}

0 comments on commit bf8293c

Please sign in to comment.