urgencyString + source + ": " + message, null);
fullMessage,null); logDocument.insertString(logDocument.getLength(), "\n",null);  Element map = logDocument.getDefaultRootElement(); int lines = map.getElementCount(); if(lines > MAXLINES) { Element first = map.getElement(0); Element last = map.getElement(lines - MAXLINES); logDocument.remove(first.getStartOffset(), last.getEndOffset()); }  if(stream != null) { stream.write(fullMessage); stream.write(lineSep); }
	private static void _log(int urgency, String source, String message)	{		String urgencyString = "[" + urgencyToString(urgency) + "] ";		message = message + '\n';		try		{			logDocument.insertString(logDocument.getLength(),				urgencyString + source + ": " + message,				null);		}		catch(BadLocationException bl)		{			bl.printStackTrace();		}		message = urgencyString +  message;		if(urgency >= level)		{			if(urgency == ERROR)				realErr.print(message);			else				realOut.print(message);		}	}