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;
    }