Skip to content

Commit

Permalink
Polish "Avoid using deprecated NCSARequestLog"
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb authored and wilkinsona committed Jun 4, 2019
1 parent 160d0f3 commit e0f783c
Showing 1 changed file with 10 additions and 8 deletions.
Expand Up @@ -202,14 +202,16 @@ private void customizeServer(Server server) {

private void customizeRequestLog(CustomRequestLog requestLog) {
if (requestLog.getWriter() instanceof RequestLogWriter) {
RequestLogWriter writer = (RequestLogWriter) requestLog.getWriter();
String filename = writer.getFileName();
if (StringUtils.hasLength(filename)) {
File file = new File(filename);
file = new File(file.getParentFile(),
customizePrefix(file.getName()));
writer.setFilename(file.getPath());
}
customizeRequestLogWriter((RequestLogWriter) requestLog.getWriter());
}
}

private void customizeRequestLogWriter(RequestLogWriter writer) {
String filename = writer.getFileName();
if (StringUtils.hasLength(filename)) {
File file = new File(filename);
file = new File(file.getParentFile(), customizePrefix(file.getName()));
writer.setFilename(file.getPath());
}
}

Expand Down

0 comments on commit e0f783c

Please sign in to comment.