Issue #3337 disable logback packaging data in cave
Former-commit-id:2baedbf6b8
[formerly56363ffc4a
] [formerlyc003d70168
] [formerly2baedbf6b8
[formerly56363ffc4a
] [formerlyc003d70168
] [formerly939fde1575
[formerlyc003d70168
[formerly db10ba5a37dbe219110f4f902bf9257f2f220b3d]]]] Former-commit-id:939fde1575
Former-commit-id:25379a63f6
[formerlyc421e2de75
] [formerly 3c068152fc5db062515196cd9a0c4241b85b8f92 [formerlya2cfcd8716
]] Former-commit-id: f92a2a465f2193ba867848c40d1d3ca215e457ba [formerly75ffabbcc2
] Former-commit-id:b54a9694ee
This commit is contained in:
parent
b88d5fc6e7
commit
21d3d905b1
1 changed files with 33 additions and 1 deletions
|
@ -39,7 +39,10 @@ import com.raytheon.uf.viz.core.status.VizStatusInternal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements status handling by converting status messages into StatusMessages
|
* Implements status handling by converting status messages into StatusMessages
|
||||||
* and sending them to alertviz
|
* and sending them to alertviz.
|
||||||
|
*
|
||||||
|
* Also logs to a file so the error can be traced to the specific process id and
|
||||||
|
* as a safety net in case alertviz cannot be reached.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
|
@ -47,6 +50,7 @@ import com.raytheon.uf.viz.core.status.VizStatusInternal;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Sep 09, 2008 1433 chammack Initial creation
|
* Sep 09, 2008 1433 chammack Initial creation
|
||||||
* Aug 26, 2013 2142 njensen Changed to use SLF4J
|
* Aug 26, 2013 2142 njensen Changed to use SLF4J
|
||||||
|
* Jul 02, 2014 3337 njensen Disabled logback packaging data
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author chammack
|
* @author chammack
|
||||||
|
@ -62,6 +66,34 @@ public class SystemStatusHandler extends AbstractStatusHandler {
|
||||||
|
|
||||||
private static final Marker FATAL = MarkerFactory.getMarker("FATAL");
|
private static final Marker FATAL = MarkerFactory.getMarker("FATAL");
|
||||||
|
|
||||||
|
static {
|
||||||
|
/*
|
||||||
|
* Disables the packaging data feature of logback (ie how the
|
||||||
|
* stacktraces list the jar the class is in). Due to the viz dependency
|
||||||
|
* tree, in some scenarios the determination of the packaging data can
|
||||||
|
* spend an inordinate amount of time in the OSGi classloader trying to
|
||||||
|
* find classes. If the viz dependency tree is cleaned up (ie
|
||||||
|
* modularized, unnecessary imports removed, register buddies reduced)
|
||||||
|
* then this may be able to be re-enabled without a performance hit.
|
||||||
|
*
|
||||||
|
* Unfortunately there is no way to do this other than casting to a
|
||||||
|
* logback Logger, see http://jira.qos.ch/browse/LOGBACK-730 and
|
||||||
|
* http://jira.qos.ch/browse/LOGBACK-899
|
||||||
|
*/
|
||||||
|
try {
|
||||||
|
((ch.qos.logback.classic.Logger) logger).getLoggerContext()
|
||||||
|
.setPackagingDataEnabled(false);
|
||||||
|
} catch (Throwable t) {
|
||||||
|
/*
|
||||||
|
* given that this static block is for initializing the logger
|
||||||
|
* correctly, if that went wrong let's not even try to "log" it,
|
||||||
|
* just use stderr
|
||||||
|
*/
|
||||||
|
System.err.println("Error disabling logback packaging data");
|
||||||
|
t.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue