Code example for StreamHandler

Methods: setLevel

0
  } 
 
  static Logger logger = Logger.global;// Logger.getLogger("fido");
  static { 
    logger.setLevel(Level.ALL);
    Handler h = new StreamHandler(System.out, new SimpleFormatter());
    h.setLevel(Level.ALL);
    logger.addHandler(h);
  } 
 
  /* 
   * (non-Javadoc) 
   *  
   * @see org.xml.sax.ContentHandler#characters(char[], int, int) 
   */ 
  @Override 
public void characters(char[] ch, int start, int length) throws SAXException {
    logger.fine("<!--characters start-->" + new String(ch, start, length)
        + "<!--end-->"); 
    super.characters(ch, start, length);
  }