src/Log/T_Logger.php
protected function log(
        $message, $source = null, $level = E_NOTICE, $data = null
    )
    {
        if (!($this->evtManager instanceof Manager)) {
            $e = new ExceptionExtended(sprintf(
                "%s::\$evtManager isn't instance of %s",
                get_class($this), Manager::class
            ));
            $e->setData($data);
            throw $e;
        }
        if (is_null($source)) {
            $source = ":missed:";
        }
        $args = new Args([
            'message' => $message,
            'source'  => $source,
            'level'   => (int)$level,
        ]);
        $this->evtManager->fire(':log:', $args);
    }
protected function log(
        $message, $source = null, $level = E_NOTICE, $data = null
    )
    {
        if (!($this->evtManager instanceof Manager)) {
            $e = new ExceptionExtended(sprintf(
                "%s::\$evtManager isn't instance of %s",
                get_class($this), Manager::class
            ));
            $e->setData($data);
            throw $e;
        }
        if (is_null($source)) {
            $source = ":missed:";
        }
        $args = new Args([
            'message' => $message,
            'source'  => $source,
            'level'   => (int)$level,
        ]);
        $this->evtManager->fire(':log:', $args);
    }
protected function log ( $ message , $ source = null , $ level = E_NOTICE , $ data = null ) { if ( ! ( $ this -> evtManager instanceof Manager ) ) { $ e = new ExceptionExtended ( sprintf ( "%s::\$evtManager isn't instance of %s" , get_class ( $ this ) , Manager :: class ) ) ; $ e -> setData ( $ data ) ; throw $ e ; } if ( is_null ( $ source ) ) { $ source = ":missed:" ; } $ args = new Args ( [ 'message' => $ message , 'source' => $ source , 'level' => ( int ) $ level , ] ) ; $ this -> evtManager -> fire ( ':log:' , $ args ) ; }
Fires event to log message.

@param  string $message
@param  string $source
@param  int    $level
@param  mixed  $data     Exception data
@return void
@throws ExceptionExtended  If no event manager present.
Fires event to log message .