Skip to content

Commit

Permalink
Improve logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
noboomu committed Oct 24, 2018
1 parent f310c46 commit 9eb660e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<pattern>%date{ISO8601} %highlight(%-5level) [%boldCyan(%logger)]
[%boldYellow(%method %F) ] - %boldWhite(%message) %n %red(%ex)
<pattern>%date{ISO8601} %highlight(%.-1level) [%boldCyan(%logger)] [%boldYellow(%method)] - %boldWhite(%message) %n
</pattern>
</encoder>
</appender>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ public ServerResponse<T> badRequest(Throwable t)
this.throwable = t;
return this.badRequest();
}

public ServerResponse<T> badRequest(String message)
{
return this.errorMessage(message).badRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean handleDefaultResponse(HttpServerExchange exchange)

errorMap.put("code", Integer.toString(statusCode));

log.error(throwable.getMessage() + " at " + path,throwable);
log.error("\ntmessage: " + throwable.getMessage() + "\ntpath: " + path,throwable);

if( throwable.getStackTrace() != null )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,6 @@ public void generateSwaggerHTML()

java.nio.file.Files.copy(entryInputStream, entryFilePath,StandardCopyOption.REPLACE_EXISTING);

System.out.println("copying file to " + entryFilePath);

// String sharedCSS = null;
//
// try(InputStream templateInputStream = this.getClass().getClassLoader().getResourceAsStream(resourcePrefix + File.separator + ".." + File.separator + "/swagger-ui.css"))
Expand Down

0 comments on commit 9eb660e

Please sign in to comment.