Add a custom Log Record Handler to the root of the tree
@param handler The handler to add
@return this
8164
public RedwoodConfiguration rootHandler(final LogRecordHandler handler){
    tasks.add(new Runnable(){ public void run(){ Redwood.appendHandler(handler); } });
    Redwood.appendHandler(handler);
    return this;
  }
361609
protected static void appendHandler(Class<? extends LogRecordHandler> parent, LogRecordHandler child){
    List<LogRecordHandler> toAdd = new LinkedList<LogRecordHandler>();
    //--Find Parents
    for(LogRecordHandler term : handlers){
      if(parent.isAssignableFrom(term.getClass())){
        toAdd.add(term);
      }
    }
    //--Add Handler
    for(LogRecordHandler p : toAdd){
      appendHandler(p, child);
    }
  }
148614
@Override
    public HttpServerRequest handler(Handler<Buffer> handler) {
        handler.handle(context.getBody());
        return this;
    }
817768
def _configure_root_logger(self):
        """"""
        root_logger = logging.getLogger()
        root_logger.setLevel(logging.DEBUG)
        if self.args.verbose:
            handler = logging.StreamHandler(sys.stdout)
        else:
            handler = logging.handlers.RotatingFileHandler(
                common.LOG_FILE,
                maxBytes=common.MAX_LOG_SIZE,
                backupCount=common.MAX_LOG_COUNT
            )
            handler.setLevel(logging.INFO)
        handler.setFormatter(logging.Formatter(common.LOG_FORMAT))
        root_logger.addHandler(handler)
370398
@SuppressWarnings("unchecked")
    public <E extends Throwable> 
    ExceptionHandler<? super E> addExceptionHandler(
            Class<E> type, ExceptionHandler<? super E> handler) {
        exceptionHandlerCache.clear();
        return (ExceptionHandler<? super E>) exceptionHandlers.put(type, handler);
    }
27240
public void addMapHandler(AbstractGeometryIndexMapHandler handler) {
		handler.setIndex(index);
		handler.setService(service);
		handler.setEventParser(this);
		if (handler instanceof MapDownHandler) {
			downHandlers.add((MapDownHandler) handler);
		}
		if (handler instanceof MapUpHandler) {
			upHandlers.add((MapUpHandler) handler);
		}
		if (handler instanceof MapDragHandler) {
			dragHandlers.add((MapDragHandler) handler);
		}
		if (handler instanceof MouseOverHandler) {
			overHandlers.add((MouseOverHandler) handler);
		}
		if (handler instanceof MouseOutHandler) {
			outHandlers.add((MouseOutHandler) handler);
		}
		if (handler instanceof MouseMoveHandler) {
			moveHandlers.add((MouseMoveHandler) handler);
		}
		if (handler instanceof DoubleClickHandler) {
			doubleClickHandlers.add((DoubleClickHandler) handler);
		}
	}
110697
@Nonnull
  public final HandlerRegistration addMessageHandler( @Nonnull final MessageEvent.Handler handler )
  {
    return _eventBus.addHandler( MessageEvent.getType(), handler );
  }
810358
private void addHandler(Object handler)
    {
        // Would be nice to have a better way to do this,
        // but the type information isn't preserved in the XML format anymore -
        // and the number of types of handler is pretty unlikely to change, so this list
        // won't have to be added to often, if at all.
        if (handler == null)
            return;

        if (handler instanceof IVideoProducer)
            addVideoProducer((IVideoProducer)handler);
        else if (handler instanceof IAudioProducer)
            addAudioProducer((IAudioProducer)handler);
        else if (handler instanceof ICommandHandler)
            addCommandHandler((ICommandHandler)handler);
        else if (handler instanceof IObservationProducer)
            addObservationProducer((IObservationProducer)handler);
        else if (handler instanceof IRewardProducer)
            addRewardProducer((IRewardProducer)handler);
        else if (handler instanceof IWorldGenerator)
            addWorldGenerator((IWorldGenerator)handler);
        else if (handler instanceof IWorldDecorator)
            addWorldDecorator((IWorldDecorator)handler);
        else if (handler instanceof IWantToQuit)
            addQuitProducer((IWantToQuit)handler);
        else
            this.failedHandlers += handler.getClass().getSimpleName() + " isn't of a recognised handler type.\n";
    }
590610
@Override
    public HandlerRegistration addSearchNoResultHandler(final SearchNoResultEvent.SearchNoResultHandler handler) {
        return addHandler(handler, SearchNoResultEvent.TYPE);
    }
276351
def add_handler(self, message_type, handler):
        """"""
        if message_type not in self._handlers:
            self._handlers[message_type] = []

        if handler not in self._handlers[message_type]:
            self._handlers[message_type].append(handler)
845451
public JsHandlerRegistration addGeometryIndexHighlightEndHandler(final GeometryIndexHighlightEndHandler handler) {
		org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler h;
		h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexHighlightEndHandler() {

			public void onGeometryIndexHighlightEnd(GeometryIndexHighlightEndEvent event) {
				org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent e;
				List<GeometryIndex> indices = event.getIndices();
				e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexHighlightEndEvent(
						event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()]));
				handler.onGeometryIndexHighlightEnd(e);
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexHighlightEndHandler(h) });
	}
585181
def set_formatter(log_formatter):
        """"""
        # Add our formatter to all the handlers
        root_logger = logging.getLogger()
        for handler in root_logger.handlers:
            handler.setFormatter(logging.Formatter(log_formatter))
621285
public JsHandlerRegistration addGeometryEditStopHandler(final GeometryEditStopHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditStopHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditStopHandler() {

			public void onGeometryEditStop(GeometryEditStopEvent event) {
				handler.onGeometryEditStop(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditStopEvent(
						event.getGeometry()));
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryEditStopHandler(h) });
	}
172812
public synchronized void setHandler(Handler handler) {
        String handlerId = CollectorManagerUtils.getHandlerId(handler);
        HandlerManager hdlrMgr;
        if (!handlerMgrs.containsKey(handlerId)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Adding handler to the list", handler.getClass());
            }
            hdlrMgr = new HandlerManager(handler);
            handlerMgrs.put(hdlrMgr.getHandlerId(), hdlrMgr);
            hdlrMgr.getHandler().init(this);
        }
    }
784842
def log_handler(self, handler):
        
        if not self.opened():
            handler = handler or util.noop
            self._log_handler = enums.JLinkFunctions.LOG_PROTOTYPE(handler)
            self._dll.JLINKARM_EnableLog(self._log_handler)
872349
public JsHandlerRegistration addGeometryEditResumeHandler(final GeometryEditResumeHandler handler) {
		org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler h;
		h = new org.geomajas.plugin.editing.client.event.GeometryEditResumeHandler() {

			public void onGeometryEditResume(GeometryEditResumeEvent event) {
				handler.onGeometryEditResume(new org.geomajas.plugin.editing.jsapi.client.event.GeometryEditResumeEvent(
						event.getGeometry()));
			}
		};
		return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryEditResumeHandler(h) });
	}
585781
@Api
	public final HandlerRegistration addFeatureSelectionHandler(final FeatureSelectionHandler handler) {
		return handlerManager.addHandler(FeatureSelectionHandler.TYPE, handler);
	}