Bind to the Laravel event dispatcher to log events.
194195
protected function bindEvents(): void
    {
        $userConfig = $this->app['config'][static::$abstract];

        $handler = new EventHandler($this->app->events, $userConfig);

        $handler->subscribe();

        $handler->subscribeQueueEvents($this->app->queue);

        if (isset($userConfig['send_default_pii']) && $userConfig['send_default_pii'] !== false) {
            $handler->subscribeAuthEvents();
        }
    }
777548
protected function registerLogBindings()
  {
    $this->singleton('Psr\Log\LoggerInterface', function () {
      $name = Str::slug($this->getNamespaceName());
      if ($this->monologConfigurator) {
        return call_user_func($this->monologConfigurator, new Logger($name));
      } else {
        return new Logger($name, [$this->getMonologHandler()]);
      }
    });
  }
84792
def bind event, *xargs, &blk
        #$log.debug "#{self} called EventHandler BIND #{event}, args:#{xargs} "
        if @_events
          $log.warn "bind: #{self.class} does not support this event: #{event}. #{@_events} " if !event? event
          #raise ArgumentError, "#{self.class} does not support this event: #{event}. #{@_events} " if !event? event
        else
          # it can come here if bind in initial block, since widgets add to @_event after calling super
          # maybe we can change that.
          $log.warn "BIND #{self.class} (#{event})  XXXXX no events defined in @_events. Please do so to avoid bugs and debugging. This will become a fatal error soon."
        end
        @handler ||= {}
        @event_args ||= {}
        @handler[event] ||= []
        @handler[event] << blk
        @event_args[event] ||= []
        @event_args[event] << xargs
      end
254554
private static function event()
    {
        $files = ['Event', 'EventListener'];
        $folder = static::$root.'Event'.'/';

        self::call($files, $folder);

        $files = ['ManyListenersArgumentsException'];
        $folder = static::$root.'Event/Exceptions'.'/';

        self::call($files, $folder);
    }
361967
public static function flushEventListeners(): void
    {
        if (! isset(static::$dispatcher)) {
            return;
        }

        $instance = new static();
        $className = static::class;

        foreach ($instance->getObservableEvents() as $event) {
            $event = $instance->getObservableKey($event);

            static::$dispatcher->forget("{$event}: {$className}");
        }
    }
698243
private function bindEventListenersEvents()
	{
		if ($this->_eventListeners && !$this->_listenerInstances) {
			foreach ($this->_eventListeners as $listener) {
                
				$listener = static::getListener($listener);
				
				$events = $listener->events();
				
				if ($events) foreach ($events as $name => $handler) {
					static::on($name, is_string($handler) ? [$listener, $handler] : $handler);
				}
			}
		}
	}
23343
public function registerDispatcher()
    {
        $this->app->singleton('ajax.dispatcher', function ($app) {
            return new Dispatcher(
                $app['ajaxes.collection'],
                $app['router'],
                $app
            );
        });

        $this->app->alias('ajax.dispatcher', Dispatcher::class);
    }
567440
public function listen()
    {
        if (defined('LARAVEL_START')) {
            $this->start(static::REQUEST_TIMER, LARAVEL_START);
        }

        $this->dispatcher->listen(StartProfiling::class, function (StartProfiling $event) {
            $this->start($event->name);
        });

        $this->dispatcher->listen(StopProfiling::class, function (StopProfiling $event) {
            $this->stop($event->name);
        });
    }
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);
        }
    }
1370149
public function registerEventListeners(DispatcherContract $dispatcher): void
    {
        $events = \array_merge_recursive(
            (\method_exists($this, 'discoveredEvents') ? $this->discoveredEvents() : []),
            $this->listens()
        );

        foreach ($events as $event => $listeners) {
            foreach (\array_unique($listeners) as $listener) {
                $dispatcher->listen($event, $listener);
            }
        }

        foreach ($this->subscribe as $subscriber) {
            $dispatcher->subscribe($subscriber);
        }
    }
576686
def trigger_event(self, event, client, args, force_dispatch=False):
        """"""
        self.controller.process_event(event, client, args, force_dispatch=force_dispatch)
888424
public function _dispatch($event, $args = array())
    {
        if($event != "onLog") {
            Log::d("Event " . $event, array('events'));
        }
        $eventResult = new EventResult();
        global $context;
        $buffer = array();
        if (!is_array($args)) {
            $args = array($args);
        }
        if (isset($this->handlers[$event]) && count($this->handlers[$event]) > 0) {
            $handlers = $this->handlers[$event];
            foreach ($handlers as $item) {
                $eventResult->addHandler($item);
                $result = $item->run($args);
                if($result !== false) {
                    $eventResult->addResult($result, $item);
                }
            }
        }
        return $eventResult;
    }
1014002
public function listen( Closure $callback )
	{
		if ( !isset( $this->dispatcher ) )
			throw new RuntimeException( 'Events dispatcher has not been set.' );

		Hooks::addHook( 'logger', $callback );
	}
286005
protected function registerManagerStopCallback()
    {
        $this->swooleServer->on('ManagerStop', function () {
            $this->events->dispatch(new Events\ManagerStopped($this));

            $this->dispatchEvent('ManagerStop', $this);
        });
    }
1153528
protected function createEmergencyLogger()
    {
        return new Logger(new Monolog('laravel', $this->prepareHandlers([new StreamHandler(
                $this->app->storagePath().'/logs/laravel.log', $this->level(['level' => 'debug'])
        )])), $this->app['events']);
    }
1130067
public function registerEvents()
    {
        $job = & $this->job;

        Event::listen(Event::JOB_PERFORM, function ($event, $_job) use (&$job) {
            $job = $_job;
        });
    }
929194
protected function listenForEvents()
    {
        $events = $this->container['events'];

        $events->listen('nova.queue.processing', function ($connection, $job)
        {
            $this->writeOutput($job, 'starting');
        });

        $events->listen('nova.queue.processed', function ($connection, $job)
        {
            $this->writeOutput($job, 'success');
        });

        $events->listen('nova.queue.failed', function ($connection, $job)
        {
            $this->writeOutput($job, 'failed');
        });
    }