diff options
author | Thomas <> | 2021-03-25 20:08:15 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-25 20:08:15 +0100 |
commit | 3ec2915b60798b7ff2b99aeec6ccc6aa9fee5d85 (patch) | |
tree | 05fc81e2d66e55a512f3a443d62bd981b6416a67 /moaSig/moa-sig-lib/src/main/java/at/gv/egovernment | |
parent | 60f50b03394d437945a5a3d6b6f6dd950230b01c (diff) | |
download | moa-sig-3ec2915b60798b7ff2b99aeec6ccc6aa9fee5d85.tar.gz moa-sig-3ec2915b60798b7ff2b99aeec6ccc6aa9fee5d85.tar.bz2 moa-sig-3ec2915b60798b7ff2b99aeec6ccc6aa9fee5d85.zip |
update IaikLog implementation to log PII on trace level
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java index e4a3921..84dc8bf 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java @@ -108,7 +108,8 @@ public class IaikLog implements iaik.logging.Log { */ @Override public void info(TransactionId transactionId, Object message, Throwable t) { - final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, maskMessage(message)); + Object blankedMsg = log.isTraceEnabled() ? message : maskMessage(message); + final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, blankedMsg); log.info(msg.toString(), t); } @@ -126,7 +127,8 @@ public class IaikLog implements iaik.logging.Log { */ @Override public void warn(TransactionId transactionId, Object message, Throwable t) { - final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, maskMessage(message)); + Object blankedMsg = log.isTraceEnabled() ? message : maskMessage(message); + final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, blankedMsg); log.warn(msg.toString(), t); } @@ -144,7 +146,8 @@ public class IaikLog implements iaik.logging.Log { */ @Override public void error(TransactionId transactionId, Object message, Throwable t) { - final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, maskMessage(message)); + Object blankedMsg = log.isTraceEnabled() ? message : maskMessage(message); + final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, blankedMsg); log.error(msg.toString(), t); } @@ -162,7 +165,8 @@ public class IaikLog implements iaik.logging.Log { */ @Override public void fatal(TransactionId transactionId, Object message, Throwable t) { - final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, maskMessage(message)); + Object blankedMsg = log.isTraceEnabled() ? message : maskMessage(message); + final IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, blankedMsg); log.error(msg.toString(), t); } |