@Test(expected = NullPointerException.class) public void testFormatSourceNull() { CompactFormatter cf = new CompactFormatter(); cf.formatSource((LogRecord) null); fail(cf.toString()); }
public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record.getLoggerName()); } return source; }
CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record.getLoggerName()); } return source; } }
CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record.getLoggerName()); } return source; } CompactFormatter();  CompactFormatter(final String format); }
CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record.getLoggerName()); } return source; } CompactFormatter();  CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); String formatMessage(final Throwable t); String formatLevel(final LogRecord record); String formatSource(final LogRecord record); String formatLoggerName(final LogRecord record); String formatThrown(final LogRecord record); String formatBackTrace(LogRecord record); }
CompactFormatter extends java.util.logging.Formatter { public String formatSource(final LogRecord record) { String source = record.getSourceClassName(); if (source != null) { if (record.getSourceMethodName() != null) { source = simpleClassName(source) + " " + record.getSourceMethodName(); } else { source = simpleClassName(source); } } else { source = simpleClassName(record.getLoggerName()); } return source; } CompactFormatter();  CompactFormatter(final String format); @Override String format(final LogRecord record); @Override String formatMessage(final LogRecord record); String formatMessage(final Throwable t); String formatLevel(final LogRecord record); String formatSource(final LogRecord record); String formatLoggerName(final LogRecord record); String formatThrown(final LogRecord record); String formatBackTrace(LogRecord record);  }