private void _log(int levelValue, PrintStream stream, Object object, Throwable throwable)
   {
      if (levelValue >= levels.getLevelValue(name))
      {
         String msg;

         if (object instanceof Throwable && throwable == null)
            throwable = (Throwable) object;

         msg = object.toString();

         stream.printf(formatPattern, new Date(), Thread.currentThread().getName(), levelNames[levelValue], name, msg);
         if (throwable != null)
            throwable.printStackTrace(stream);
      }
   }