aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-11-28 11:04:46 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-11-28 11:04:46 +0100
commit2b70ab18a97dd248d478d985ae602bd7e3a9d320 (patch)
tree32ec7e5d1b327f4b356f404d55d071c444a06a2e /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets
parent48f8e5362fa6c7b2f0a708e2dd61cac1dd366397 (diff)
downloadpdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.tar.gz
pdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.tar.bz2
pdf-as-4-2b70ab18a97dd248d478d985ae602bd7e3a9d320.zip
Logging Error Levels adapted
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java4
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java2
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureCertificateData.java8
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureData.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java2
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java4
8 files changed, 19 insertions, 19 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
index 5b951b78..86bef9f3 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
@@ -94,7 +94,7 @@ public class DataURLServlet extends HttpServlet {
PdfAsHelper.injectSignature(request, response, createCMSSignatureResponseType, getServletContext());
} else if(jaxbObject.getValue() instanceof ErrorResponseType) {
ErrorResponseType errorResponseType = (ErrorResponseType)jaxbObject.getValue();
- logger.error("SecurityLayer: " + errorResponseType.getErrorCode() + " " + errorResponseType.getInfo());
+ logger.warn("SecurityLayer: " + errorResponseType.getErrorCode() + " " + errorResponseType.getInfo());
throw new PdfAsSecurityLayerException(errorResponseType.getInfo(),
errorResponseType.getErrorCode());
} else {
@@ -102,7 +102,7 @@ public class DataURLServlet extends HttpServlet {
9999);
}
} catch (Exception e) {
- logger.error("Error in DataURL Servlet. " , e);
+ logger.warn("Error in DataURL Servlet. " , e);
PdfAsHelper.setSessionException(request, response, e.getMessage(),
e);
PdfAsHelper.gotoError(getServletContext(), request, response);
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
index 7900dfde..0982c98c 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
@@ -194,7 +194,7 @@ public class ExternSignServlet extends HttpServlet {
}
}
catch(Throwable e) {
- logger.error("In resolving filename", e);
+ logger.warn("In resolving filename", e);
}
if(filecontent.length < 10) {
filecontent = null;
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
index b0c434af..483b9707 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
@@ -85,9 +85,9 @@ public class PDFData extends HttpServlet {
if(plainPDFDigest != null) {
String signatureDataHash = PdfAsHelper.getSignatureDataHash(request);
if(!plainPDFDigest.equalsIgnoreCase(signatureDataHash)) {
- logger.error("Digest Hash mismatch!");
- logger.error("Requested digest: " + plainPDFDigest);
- logger.error("Saved digest: " + signatureDataHash);
+ logger.warn("Digest Hash mismatch!");
+ logger.warn("Requested digest: " + plainPDFDigest);
+ logger.warn("Saved digest: " + signatureDataHash);
PdfAsHelper.setSessionException(request, response,
"Signature Data digest do not match!", null);
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureCertificateData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureCertificateData.java
index 9b3e9f31..e4465e77 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureCertificateData.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureCertificateData.java
@@ -99,17 +99,17 @@ public class PDFSignatureCertificateData extends HttpServlet {
os.write(res.getSignerCertificate().getEncoded());
os.close();
} else {
- logger.error("Verification CERT not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
+ logger.warn("Verification CERT not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} catch (NumberFormatException e) {
- logger.error("Verification CERT not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
+ logger.warn("Verification CERT not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} catch (PdfAsException e) {
- logger.error("Verification CERT not found:", e);
+ logger.warn("Verification CERT not found:", e);
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} catch (CertificateEncodingException e) {
- logger.error("Verification CERT invalid:", e);
+ logger.warn("Verification CERT invalid:", e);
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
}
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureData.java
index 63a38c52..e493f4ae 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureData.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFSignatureData.java
@@ -98,14 +98,14 @@ public class PDFSignatureData extends HttpServlet {
os.write(res.getSignatureData());
os.close();
} else {
- logger.error("Verification DATA not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
+ logger.warn("Verification DATA not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
} catch (NumberFormatException e) {
- logger.error("Verification DATA not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
+ logger.warn("Verification DATA not found! for id " + request.getParameter(SIGN_ID) + " in session " + request.getSession().getId());
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} catch (PdfAsException e) {
- logger.error("Verification DATA not found:", e);
+ logger.warn("Verification DATA not found:", e);
response.sendError(HttpServletResponse.SC_NOT_FOUND);
}
}
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java
index e602a8e0..53be36da 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java
@@ -166,7 +166,7 @@ public class UIEntryPointServlet extends HttpServlet {
}
} catch (Throwable e) {
- logger.error("Failed to process Request: ", e);
+ logger.warn("Failed to process Request: ", e);
PdfAsHelper.setSessionException(req, resp, e.getMessage(), e);
PdfAsHelper.gotoError(getServletContext(), req, resp);
}
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
index aaa6afbb..32bb41ac 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
@@ -99,7 +99,7 @@ public class VerifyServlet extends HttpServlet {
byte[] pdfData = RemotePDFFetcher.fetchPdfFile(pdfUrl);
doVerify(request, response, pdfData);
} catch (Throwable e) {
- logger.error("Generic Error: ", e);
+ logger.warn("Generic Error: ", e);
PdfAsHelper.setSessionException(request, response, e.getMessage(),
e);
PdfAsHelper.gotoError(getServletContext(), request, response);
@@ -187,7 +187,7 @@ public class VerifyServlet extends HttpServlet {
name);
}
} catch (Throwable e) {
- logger.error("In resolving filename", e);
+ logger.warn("In resolving filename", e);
}
if (filecontent.length < 10) {
filecontent = null;
@@ -233,7 +233,7 @@ public class VerifyServlet extends HttpServlet {
doVerify(request, response, filecontent);
} catch (Throwable e) {
- logger.error("Generic Error: ", e);
+ logger.warn("Generic Error: ", e);
PdfAsHelper.setSessionException(request, response, e.getMessage(),
e);
PdfAsHelper.gotoError(getServletContext(), request, response);
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java
index 1ee6f0f8..b49264f7 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VisBlockServlet.java
@@ -83,10 +83,10 @@ public class VisBlockServlet extends HttpServlet {
throw new ServletException(PARAM_RESOLUTION
+ " invalid value! Not a Number");
} catch (CertificateException e) {
- logger.error("CERT Error", e);
+ logger.warn("CERT Error", e);
throw new ServletException("Failed to find certificate");
} catch (PDFASError e) {
- logger.error("PDF_AS Error", e);
+ logger.warn("PDF_AS Error", e);
throw new ServletException("Generic Error");
}
}