Code example for StreamHandler

0
	@Override 
	public Logger getLogger(Class<?> c) {
		if (logger == null) {
			logger = Logger.getLogger(c.getName());
			logger.addHandler(new StreamHandler(plainText, new SimpleFormatter()));
			logger.addHandler(new StreamHandler(xml, new XMLFormatter()));
		} 
		 
		return logger;
	} 
 
	@Override 
	public String getPlainText() {
		return plainText.toString();
	} 
	 
	@Override 
	public String getXML() {
		return xml.toString();
	}