public static List<LogLine> setConsumer(Consumer<LogLine> subscriber)
	{
		// Switch to the new subscriber
		LOG_SUBSCRIBER = subscriber;

		// If there are queued messages (if this is the first consumer to register) then we should take a copy for them
		if (QUEUE != null)
		{
			List<LogLine> queued = new ArrayList<>(QUEUE);

			QUEUE = null;

			return queued;
		}
		else
		{
			return Collections.emptyList();
		}
	}
public static List < LogLine > setConsumer ( Consumer < LogLine > subscriber ) { LOG_SUBSCRIBER = subscriber ; if ( QUEUE != null ) { List < LogLine > queued = new ArrayList < > ( QUEUE ) ; QUEUE = null ; return queued ; } else { return Collections . emptyList ( ) ; } }
Sets the method which receives new log messages, and returns any messages queued up before this consumer was registered<br
/>
The provided consumer will be notified of incoming messages until another call to {@link #setConsumer} is made or until a
call to {@link #shutdown()} is made

@param subscriber
the log subscriber; must be thread-safe because it may be called concurrently

@return