@Override
	public void publish(LogRecord record) {
		if (painted.get()) {
			synchronized (lock) {
				final LogEntry peek = logEntries.peekLast();

				if (peek == null || !peek.text.equals(record.getMessage())) {
					logEntries.offer(new LogEntry(record));
				} else if (peek.text.equals(record.getMessage())) {
					if (logEntries.removeLastOccurrence(peek)) {
						peek.timeSent = System.currentTimeMillis();
						peek.alpha = 1f;
						logEntries.offer(peek);
					} else {
						logEntries.offer(new LogEntry(record));
					}
				}
			}
		}
	}