code: public void sendWarning(Object source, String msg)
    {
      try {
        String s = getClass().getSimpleName() + ": " + msg;
      
        // if warning is high-priority then send to high priority handlers first
        System.err.println(s);
        
        for (WarningHandler handler : _priorityHandlers) {
          handler.warning(source, msg);
        }
      
        // now send to the all handlers regardless of if its high priority
        for (WarningHandler handler : _handlers) {
          handler.warning(source, msg);
        }
  
        log.warning(msg);
      } catch (Throwable e) {
        // WarningService must not throw exception
        log.log(Level.WARNING, e.toString(), e);
      }
    }
docs: Send a warning message to any registered handlers. A high priority warning
  only goes to all handlers, high priority first. High priority handlers do
  not receive non-high priority warnings.
  
  @param source source of the message, usually you
  @param msg test to print or send as an alert
  @param isHighPriority set true to send to high priority warning handlers