Add an initVerbose() method to BriefLogFormatter. Note: this does not actually appear to work :(

This commit is contained in:
Mike Hearn 2012-02-13 21:36:49 +01:00
parent 57d518aba9
commit 5fde54e8e3

View File

@ -21,9 +21,7 @@ import java.io.StringWriter;
import java.io.Writer;
import java.text.MessageFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogManager;
import java.util.logging.LogRecord;
import java.util.logging.*;
/**
* A Java logging formatter that writes more compact output than the default.
@ -36,6 +34,13 @@ public class BriefLogFormatter extends Formatter {
LogManager.getLogManager().getLogger("").getHandlers()[0].setFormatter(new BriefLogFormatter());
}
public static void initVerbose() {
Logger logger = LogManager.getLogManager().getLogger("");
logger.getHandlers()[0].setFormatter(new BriefLogFormatter());
logger.setLevel(Level.FINEST);
logger.log(Level.FINE, "test");
}
@Override
public String format(LogRecord logRecord) {
Object[] arguments = new Object[6];