public class ZFormatter extends SimpleFormatter
// set the logger to use a human-readable format Handler fh = new FileHandler("zlive.log"); fh.setFormatter(new ZFormatter()); Logger.getLogger(...).addHandler(fh);
Constructor and Description |
---|
ZFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
format(LogRecord record) |
static void |
startLogging(String where,
String fileName,
Level detail)
Helper method to start recording log messages to the
given file using the ZFormatter class as the formatter.
|
static void |
stopLogging(String where)
Stop the log messages that were started by startLogging.
|
formatMessage, getHead, getTail
public static void startLogging(String where, String fileName, Level detail)
fileName
- the name of the log filedetail
- Eg. Level.FINEST.public static void stopLogging(String where)
public String format(LogRecord record)
format
in class SimpleFormatter
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.