src/Phossa2/Logger/Logger.php
public function addHandler(
        /*# string */ $level,
        callable $handler,
        /*# string */ $channel = '*',
        /*# int */ $priority = 0
    ) {
        // check level
        if (!isset(LogLevel::$levels[$level])) {
            throw new InvalidArgumentException(
                Message::get(Message::LOG_LEVEL_INVALID, $level),
                Message::LOG_LEVEL_INVALID
            );
        }

        return $this->addCallable(
            'handlers',
            $handler,
            $channel,
            $priority,
            $level
        );
    }
public function addHandler(
        /*# string */ $level,
        callable $handler,
        /*# string */ $channel = '*',
        /*# int */ $priority = 0
    ) {
        // check level
        if (!isset(LogLevel::$levels[$level])) {
            throw new InvalidArgumentException(
                Message::get(Message::LOG_LEVEL_INVALID, $level),
                Message::LOG_LEVEL_INVALID
            );
        }

        return $this->addCallable(
            'handlers',
            $handler,
            $channel,
            $priority,
            $level
        );
    }
public function addHandler ( /*# string */ $ level , callable $ handler , /*# string */ $ channel = '*' , /*# int */ $ priority = 0 ) { // check level if ( ! isset ( LogLevel :: $ levels [ $ level ] ) ) { throw new InvalidArgumentException ( Message :: get ( Message :: LOG_LEVEL_INVALID , $ level ) , Message :: LOG_LEVEL_INVALID ) ; } return $ this -> addCallable ( 'handlers' , $ handler , $ channel , $ priority , $ level ) ; }
Add handler to the channel with priority

@param  string $level the level this handler is handling
@param  callable $handler
@param  string $channel channel to listen to
@param  int $priority
@return $this
@access public
@since  2.0.1 added level param
@api
Add handler to the channel with priority