Code example for LogRecord

Methods: getMessage

0
    /* 
     * mock classes 
     */ 
    public static class MockFilter implements Filter {
        public boolean isLoggable(LogRecord record) {
            return !record.getMessage().equals("false");
        } 
    } 
 
    public static class MockFormatter extends Formatter {
        public String format(LogRecord r) {
            if (null == r) {
                return ""; 
            } 
            return r.getMessage() + " by MockFormatter\n";
        } 
 
        public String getTail(Handler h) {
            return "tail\n"; 
        }