fixed info

This commit is contained in:
Niklas 2017-07-03 23:43:44 +02:00
parent e457a6c267
commit 6e87878e3d
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ public class APIHandler extends AbstractHandler {
@Override
public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
Logger.getLogger(getClass().getName()).log(Level.INFO, "API Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - " + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - api - " + s);
if (Termbin.getConfig().isBanned(request.getRemoteAddr())) {
request.setHandled(true);

View File

@ -21,8 +21,8 @@ public class DataHandler extends AbstractHandler {
@Override
public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
Logger.getLogger(getClass().getName()).log(Level.INFO, "API Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - " + s);
Logger.getLogger(getClass().getName()).log(Level.INFO, "DATA Request by " + request.getHeader("User-Agent") + " " + request.getRemoteAddr() + "@" + s);
Termbin.getAccesslog().log(Level.INFO, request.getRemoteAddr() + " - - " + request.getHeader("User-Agent") + " - data - " + s);
if (Termbin.getConfig().isBanned(request.getRemoteAddr())) {
request.setHandled(true);