public function createLogger(string $outputFormat, OutputInterface $reportOutput, OutputInterface $consoleOutput): LinterLoggerInterface
    {
        $errorOutput = ($consoleOutput instanceof ConsoleOutputInterface)
            ? $consoleOutput->getErrorOutput()
            : $consoleOutput;

        switch ($outputFormat) {
            case 'checkstyle':
            case 'xml':
                return new CompactConsoleLogger(new CheckstyleReportPrinter($reportOutput), $errorOutput);
            case 'txt':
            case 'text':
                return new VerboseConsoleLogger(new ConsoleReportPrinter($reportOutput), $consoleOutput);
            case 'compact':
                return new CompactConsoleLogger(new ConsoleReportPrinter($reportOutput), $consoleOutput);
            default:
                throw new \InvalidArgumentException('Invalid report printer "' . $outputFormat . '"!');
        }
    }