public function removeLoggerByInstance($logger, $trigger = true) {
        foreach ($this->loggers as $key => $addedLogger) {
            if ($addedLogger[0] === $logger) {
                unset($this->loggers[$key]);
                return $this;
            }
        }

        if ($trigger) {
            $class = get_class($logger);
            trigger_error("Logger $class was removed without being added.");
        }

        return $this;
    }