aboutsummaryrefslogtreecommitdiff
path: root/moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java')
-rw-r--r--moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java
index 9eb84fa..54ab102 100644
--- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java
+++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/logging/LogMsg.java
@@ -21,23 +21,22 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
package at.gv.egovernment.moaspss.logging;
/**
* A unified message type to log messages from inside the MOA subsystem.
- *
+ *
* @author Patrick Peck
* @version $Id$
*/
public class LogMsg {
/** The message to log. */
- private Object message;
+ private final Object message;
/**
* Create a <code>LogMsg</code> object.
- *
- * @param message The actual message to log. May be <code>null</code>.
+ *
+ * @param message The actual message to log. May be <code>null</code>.
*/
public LogMsg(Object message) {
this.message = message;
@@ -45,16 +44,17 @@ public class LogMsg {
/**
* Convert this log message to a <code>String</code>.
- *
- * @return The <code>String</code> representation of this log message.
+ *
+ * @return The <code>String</code> representation of this log message.
*/
+ @Override
public String toString() {
- StringBuffer msg = new StringBuffer();
- LoggingContext ctx =
- LoggingContextManager.getInstance().getLoggingContext();
- String tid = ctx != null ? ctx.getTransactionID() : null;
- String nodeId = ctx != null ? ctx.getNodeID() : null;
-
+ final StringBuffer msg = new StringBuffer();
+ final LoggingContext ctx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ final String tid = ctx != null ? ctx.getTransactionID() : null;
+ final String nodeId = ctx != null ? ctx.getNodeID() : null;
+
msg.append("TID=");
msg.append(tid != null ? tid : "<null>");
msg.append(" NID=");