code: @Override
    public synchronized void publish(LogRecord record)
    {
      if (!super.isLoggable(record) || this.getLevel() != null &&
                                       record.getLevel().intValue() < this.getLevel().intValue())
      {
        return;
      }
  
      synchronized (logBuffer)
      {
        if (logBuffer.size() == LOG_BUFFER_SIZE)
        {
          logBuffer.remove(0);
        }
  
        logBuffer.add(record);
      }
    }
docs: Overridden Logger.Handler publish(...) method. Buffers unformatted log
  records in memory in a circular buffer-like fashion.
  
  @param record log record