Skip to content

Instantly share code, notes, and snippets.

@gwmccort
gwmccort / 0_reuse_code.js
Created August 1, 2014 20:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gwmccort
gwmccort / gist:2955055
Created June 19, 2012 16:18
use slf4j to bridge java.util.logging
/*
* use slf4j to bridge java.util.logging
*/
// Optionally remove existing handlers attached to j.u.l root logger
SLF4JBridgeHandler.removeHandlersForRootLogger(); // (since SLF4J 1.6.5)
// add SLF4JBridgeHandler to j.u.l's root logger, should be done once
// during the initialization phase of your application
SLF4JBridgeHandler.install();
@gwmccort
gwmccort / gist:2955026
Created June 19, 2012 16:14
disable java.util.logging
// disable java.util.logging
Logger globalLogger = Logger.getLogger("");
Handler[] handlers = globalLogger.getHandlers();
for (Handler handler : handlers) {
globalLogger.removeHandler(handler);
}