aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/util/logging/headers
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-12-20 11:20:39 +0100
committerJiri Vanek <[email protected]>2013-12-20 11:20:39 +0100
commit99428f6f586269f4b5856f93adb71385f6c64c97 (patch)
treef13560c1d4d7200583dc858b1ad8c387023f5013 /netx/net/sourceforge/jnlp/util/logging/headers
parentc3b3c491051c08e035593a25850e537168bb1db9 (diff)
singletons logic, logs and test cleanup/fixes
Diffstat (limited to 'netx/net/sourceforge/jnlp/util/logging/headers')
-rw-r--r--netx/net/sourceforge/jnlp/util/logging/headers/Header.java13
-rw-r--r--netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java9
2 files changed, 12 insertions, 10 deletions
diff --git a/netx/net/sourceforge/jnlp/util/logging/headers/Header.java b/netx/net/sourceforge/jnlp/util/logging/headers/Header.java
index a87a14f..bb09f89 100644
--- a/netx/net/sourceforge/jnlp/util/logging/headers/Header.java
+++ b/netx/net/sourceforge/jnlp/util/logging/headers/Header.java
@@ -42,8 +42,9 @@ import net.sourceforge.jnlp.util.logging.OutputController;
import net.sourceforge.jnlp.util.logging.OutputController.Level;
public class Header {
-
- public String user;
+ public static String default_user = System.getProperty("user.name");
+
+ public String user = default_user;
public boolean application;
public Level level;
public Date date = new Date();
@@ -56,12 +57,15 @@ public class Header {
public Header() {
}
+ public Header(Level level, boolean isC) {
+ this(level, Thread.currentThread().getStackTrace(), Thread.currentThread(), isC);
+ }
+
public Header(Level level, StackTraceElement[] stack, Thread thread, boolean isC) {
this(level, stack, thread, new Date(), isC);
}
public Header(Level level, StackTraceElement[] stack, Thread thread, Date d, boolean isC) {
- this.user = System.getProperty("user.name");
this.application = JNLPRuntime.isWebstartApplication();
this.level = level;
this.date = d;
@@ -146,7 +150,8 @@ public class Header {
result = stack[i];//at least moving up
if (stack[i].getClassName().contains(OutputController.class.getName())
|| //PluginDebug.class.getName() not avaiable during netx make
- stack[i].getClassName().contains("sun.applet.PluginDebug")) {
+ stack[i].getClassName().contains("sun.applet.PluginDebug")
+ || stack[i].getClassName().contains(Header.class.getName())) {
continue;
} else {
break;
diff --git a/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java b/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java
index 31ed19d..834085f 100644
--- a/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java
+++ b/netx/net/sourceforge/jnlp/util/logging/headers/PluginHeader.java
@@ -52,15 +52,12 @@ public class PluginHeader extends Header {
static final Pattern whiteSpaces = Pattern.compile("\\s+");
static final Pattern threadsPattern = Pattern.compile("\\s+|,\\s*|:");
+
@Override
public String toString() {
- if (preinit) {
- return "!" + super.toString();
- } else {
- return super.toString();
- }
+ return toString(true, true, true, true, true, true, true);
}
-
+
@Override
public String toString(boolean userb, boolean originb, boolean levelb, boolean dateb, boolean callerb, boolean thread1b, boolean thread2b) {
if (preinit) {