Register the bar and register the event which will block the screen log
975539
public static function register()
	{
		$class = new self();
		Events::addListener(array($class, 'screenLogEventListener'), 'screenLogEvent', EventPriority::NORMAL);
		$bar = Debugger::getBar();
		$bar->addPanel($class);
	}
936018
def register(cls, *args, **kwargs):
        """"""
        if cls.app is None:
            return register(*args, handler=cls, **kwargs)
        return cls.app.register(*args, handler=cls, **kwargs)
243911
def register_event(self, event_type, pattern, handler):
        
        if event_type not in self._supported_events:
            raise ValueError("Unsupported event type {}".format(event_type))
        if event_type != "CHANGE" and not isinstance(pattern, Pattern) and not isinstance(pattern, basestring):
            raise ValueError("Expected pattern to be a Pattern or string")
        if event_type == "CHANGE" and not (len(pattern)==2 and isinstance(pattern[0], int) and isinstance(pattern[1], numpy.ndarray)):
            raise ValueError("For \"CHANGE\" events, ``pattern`` should be a tuple of ``min_changed_pixels`` and the base screen state.")

        # Create event object
        event = {
            "pattern": pattern,
            "event_type": event_type,
            "count": 0,
            "handler": handler,
            "name": uuid.uuid4(),
            "active": True
        }
        self._events[event["name"]] = event
        return event["name"]
631099
def _proxy_to_logger(self, method_name, event, *event_args,
                         **event_kw):
        

        if isinstance(event, bytes):
            event = event.decode('utf-8')

        if event_args:
            event_kw['positional_args'] = event_args

        return super(BoundLevelLogger, self)._proxy_to_logger(method_name,
                                                         event=event,
                                                         **event_kw)
987712
def register(self, event, callable, priority=10):
        """"""
        logger.debug('registered: ' + event + ': ' + repr(callable) + ' [' + repr(self) + ']')
        return EventReceiver(event, callable, manager=self, priority=priority)
216169
function register()
	{
		set_error_handler(array($this,'_handleError'));
		set_exception_handler(array($this,'_handleException'));
		register_shutdown_function(array($this,'_shutdown'));
		$this->_registered = true;
		return $this;
	}
821626
function MenuBar(options) {
		options.skipTriggerEventListeners = true; //we want different event listeners on the trigger node
		Dropdown.call(this, options); //invoke super constructor
		
		this._initialize();
		this._dropdownNode.tabIndex = -1;
	}
1347688
@Handler(channels = Self.class)
    public void onRegistered(NioRegistration.Completed event)
            throws InterruptedException, IOException {
        NioHandler handler = event.event().handler();
        if (!(handler instanceof TcpChannelImpl)) {
            return;
        }
        if (event.event().get() == null) {
            fire(new Error(event, "Registration failed, no NioDispatcher?",
                new Throwable()));
            return;
        }
        TcpChannelImpl channel = (TcpChannelImpl) handler;
        channel.registrationComplete(event.event());
        channel.downPipeline()
            .fire(new Connected(channel.nioChannel().getLocalAddress(),
                channel.nioChannel().getRemoteAddress()), channel);
    }
1020666
def register_view(self, view):
        """"""
        super(ListViewController, self).register_view(view)
        self.tree_view.connect('button_press_event', self.mouse_click)
735779
def register_callback(self, callback, remove=False):
        """"""

        # (Un)Register the callback.
        if remove and callback in self.callbacks:
            self.callbacks.remove(callback)
        elif not remove and callback not in self.callbacks:
            self.callbacks.append(callback)
550038
protected void registerEventListener() {

        OpenCms.addCmsEventListener(
            this,
            new int[] {
                I_CmsEventListener.EVENT_RESOURCE_AND_PROPERTIES_MODIFIED,
                I_CmsEventListener.EVENT_RESOURCES_AND_PROPERTIES_MODIFIED,
                I_CmsEventListener.EVENT_RESOURCE_MODIFIED,
                I_CmsEventListener.EVENT_RESOURCES_MODIFIED,
                I_CmsEventListener.EVENT_RESOURCE_MOVED,
                I_CmsEventListener.EVENT_RESOURCE_DELETED,
                I_CmsEventListener.EVENT_PUBLISH_PROJECT,
                I_CmsEventListener.EVENT_CLEAR_CACHES,
                I_CmsEventListener.EVENT_CLEAR_ONLINE_CACHES,
                I_CmsEventListener.EVENT_CLEAR_OFFLINE_CACHES});
    }
359724
private function registerSigHandlers()
    {
        if (!function_exists('pcntl_signal')) {
            $this->logError('Please make sure that "pcntl" is enabled.', $this->getLogContext());
            throw new \RuntimeException('Please make sure that "pcntl" is enabled.');
        }

        declare(ticks = 1);

        pcntl_signal(SIGTERM, array($this, 'shutdown'));
        pcntl_signal(SIGINT, array($this, 'shutdown'));
        pcntl_signal(SIGQUIT, array($this, 'shutdown'));
        pcntl_signal(SIGUSR2, array($this, 'pauseProcessing'));
        pcntl_signal(SIGCONT, array($this, 'unPauseProcessing'));

        $this->logDebug('Finished setting up signal handlers', $this->getLogContext());
    }
967420
def register_view(self, view):
        """"""
        super(TopToolBarController, self).register_view(view)
        view['maximize_button'].connect('clicked', self.on_maximize_button_clicked)
        self.update_maximize_button()
847402
def attach(self, screen):
        
        if self.listener is not None:
            warnings.warn("As of version 0.6.0 the listener queue is "
                          "restricted to a single element. Existing "
                          "listener {0} will be replaced."
                          .format(self.listener), DeprecationWarning)

        if self.strict:
            for event in self.events:
                if not hasattr(screen, event):
                    raise TypeError("{0} is missing {1}".format(screen, event))

        self.listener = screen
        self._parser = None
        self._initialize_parser()
1198580
def _register_sigterm(self):
        

        _handler = lambda signo, frame: self.shutdown()
        signal.signal(signal.SIGTERM, _handler)
702698
def register_callback(self, sensorid, callback, user_data=None):
        """"""
        if sensorid not in self._registry:
            self._registry[sensorid] = list()
        self._registry[sensorid].append((callback, user_data))
941902
public synchronized void dispatchEvent(LogRecord event) {
        if (binaryHandler == null || 
        	((textHandler == null && logRepositoryConfiguration.isTextEnabled()) || 
        	(textHandler != null && !logRepositoryConfiguration.isTextEnabled()))) {
            determineHandlers();
        }
        if (binaryHandler == null)	{ 	// Either doing LogManager Reset, or major issue occurring 666241.1
        	return ;
        } else {
            binaryHandler.publish(event);
        }
        if (textHandler != null) {
            textHandler.publish(event);
        }
    }