public function addLogger(callable $callback)
    {
        if (!is_callable($callback)) {
            throw LoggerException::forInvalidCallback();
        }

        if ($callback instanceof Closure) {
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->loggers[] = $callback;

        return $this;
    }
public function addLogger(callable $callback)
    {
        if (!is_callable($callback)) {
            throw LoggerException::forInvalidCallback();
        }

        if ($callback instanceof Closure) {
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->loggers[] = $callback;

        return $this;
    }
public function addLogger ( callable $ callback ) { if ( ! is_callable ( $ callback ) ) { throw LoggerException :: forInvalidCallback ( ) ; } if ( $ callback instanceof Closure ) { $ callback = $ callback -> bindTo ( $ this , get_class ( $ this ) ) ; } $ this -> loggers [ ] = $ callback ; return $ this ; }
Adds a logger callback when it happens

@param *callable $callback

@return LoggerTrait
Adds a logger callback when it happens