public function offsetSet($offset, $logger)
    {
        if (!($logger instanceof \Plop\LoggerInterface)) {
            throw new \Plop\Exception('Invalid logger');
        }

        $id = static::getLoggerId($logger);
        if (is_string($offset)) {
            if ($offset != $id) {
                throw new \Plop\Exception('Identifier mismatch');
            }
        }

        $this->loggers[$id] = $logger;
    }
public function offsetSet($offset, $logger)
    {
        if (!($logger instanceof \Plop\LoggerInterface)) {
            throw new \Plop\Exception('Invalid logger');
        }

        $id = static::getLoggerId($logger);
        if (is_string($offset)) {
            if ($offset != $id) {
                throw new \Plop\Exception('Identifier mismatch');
            }
        }

        $this->loggers[$id] = $logger;
    }
public function offsetSet ( $ offset , $ logger ) { if ( ! ( $ logger instanceof \ Plop \ LoggerInterface ) ) { throw new \ Plop \ Exception ( 'Invalid logger' ) ; } $ id = static :: getLoggerId ( $ logger ) ; if ( is_string ( $ offset ) ) { if ( $ offset != $ id ) { throw new \ Plop \ Exception ( 'Identifier mismatch' ) ; } } $ this -> loggers [ $ id ] = $ logger ; }
Register a new logger with Plop.

\param mixed $offset
(deprecated) Identifier for the logger,
must match the identifier of the logger
given in \a $logger.

\param Plop::LoggerInterface $logger
New logger to register.

\deprecated
The \a $offset argument is deprecated as
Plop already deduces the value automatically
from the \a $logger argument.

\note
If a logger already exists with the given identifier,
it will be replaced by the new one.

\note
The usual pattern for registering new loggers is
\code
$logging[] = $logger;
\endcode
Also, Plop::addLogger() is an alias for that pattern.
Register a new logger with Plop .