public void publish(String message,Level level){
  try {
    publish(new LogRecord(level,message));
  }
 catch (  BadLocationException e) {
    throw new RuntimeException("Error writing a log-like message.",e);
  }
}

public void publish ( String message , Level level ) { try { publish ( new LogRecord ( level , message ) ) ; } catch ( BadLocationException e ) { throw new RuntimeException ( "Error writing a log-like message." , e ) ; } }
print a message as if it were logged , without going through the full logger .
