mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 10:12:19 +01:00
Add an initVerbose() method to BriefLogFormatter. Note: this does not actually appear to work :(
This commit is contained in:
parent
57d518aba9
commit
5fde54e8e3
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user