-
-
Save jboner/646397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shutdown HawtDispatch GlobalQueue | |
org.fusesource.hawtdispatch.ScalaDispatch.globalQueue.asInstanceOf[org.fusesource.hawtdispatch.internal.GlobalDispatchQueue].shutdown | |
// Clear Thread.subclassAudits | |
val tf = classOf[java.lang.Thread].getDeclaredField("subclassAudits") | |
tf.setAccessible(true) | |
val subclassAudits = tf.get(null).asInstanceOf[java.util.Map[_,_]] | |
subclassAudits.synchronized {subclassAudits.clear} | |
// Clear and reset j.u.l.Level.known (due to Configgy) | |
val lf = classOf[java.util.logging.Level].getDeclaredField("known") | |
lf.setAccessible(true) | |
val known = lf.get(null).asInstanceOf[java.util.ArrayList[java.util.logging.Level]] | |
known.synchronized { | |
known.clear | |
known.add(java.util.logging.Level.OFF) | |
known.add(java.util.logging.Level.SEVERE) | |
known.add(java.util.logging.Level.WARNING) | |
known.add(java.util.logging.Level.INFO) | |
known.add(java.util.logging.Level.CONFIG) | |
known.add(java.util.logging.Level.FINE) | |
known.add(java.util.logging.Level.FINER) | |
known.add(java.util.logging.Level.FINEST) | |
known.add(java.util.logging.Level.ALL) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment