@Override
  public synchronized String format(final LogRecord record) {
    @SuppressWarnings("JavaTimeDefaultTimeZone")
    final ZonedDateTime time = ZonedDateTime.now();

    // I1030 12:55:44.747944 1407373 c/g/s/z/b/logging.LogFormatter::format]
    final char shortLevel = Ascii.toUpperCase(Logger.levelToString(record.getLevel()).charAt(0));
    final String prefix =
        (Character.isAlphabetic(shortLevel) ? shortLevel : '?')
            + Strings.padStart(Integer.toString(time.getMonthValue()), 2, '0')
            + Strings.padStart(Integer.toString(time.getDayOfMonth()), 2, '0')
            + ' '
            + Strings.padStart(Integer.toString(time.getHour()), 2, '0')
            + ':'
            + Strings.padStart(Integer.toString(time.getMinute()), 2, '0')
            + ':'
            + Strings.padStart(Integer.toString(time.getSecond()), 2, '0')
            + '.'
            + Strings.padStart(Integer.toString(time.getNano() / 1000), 6, '0')
            + ' '
            + record.getThreadID()
            + ' '
            + formatClassName(record.getSourceClassName())
            + "::"
            + record.getSourceMethodName()
            + "] ";
    final StringBuilder b = new StringBuilder();
    b.append(prefix).append(record.getMessage()).append('\n');

    final Throwable t = record.getThrown();
    if (t != null) {
      final StringWriter sw = new StringWriter();
      t.printStackTrace(new PrintWriter(sw));
      Splitter.on('\n')
          .omitEmptyStrings()
          .splitToList(sw.getBuffer())
          .forEach(s -> b.append(prefix).append(s).append('\n'));
    }
    return b.toString();
  }
Formats log records in a simple, Google-style format.
java/ui/src/main/java/com/google/security/zynamics/bindiff/logging/LogFormatter.java