public static function lint($config, $verifyLogFiles = false)
    {
        $valid = true;
        $checks = [];

        // Valid YAML
        $checks['valid_yaml'] = [
            'message' => 'Is a valid YAML file',
        ];
        try {
            $config = self::parse($config);
            $checks['valid_yaml']['status'] = 'ok';
        } catch (\Exception $e) {
            $valid = false;
            $checks['valid_yaml']['status'] = 'fail';
            $checks['valid_yaml']['error'] = $e->getMessage();
        }
        try {
            // Valid structure
            $checks['valid_structure'] = self::lintValidProperties($config);
            if ($checks['valid_structure']['status'] == 'fail') {
                throw new \Exception();
            }

            // Valid config values
            $checks['valid_settings'] = self::lintValidSettingsValues($config);
            if ($checks['valid_settings']['status'] == 'fail') {
                throw new \Exception();
            }

            // Validate log collections (each)

            $checks['log_collections'] = [
                'message' => 'Checking log collections',
            ];
            try {
                foreach ($config['logs'] as $logCollectionName => $logCollection) {
                    $checks['log_collections']['sub_checks'][$logCollectionName] = self::lintLogCollection($logCollectionName, $logCollection);
                    if ($checks['log_collections']['sub_checks'][$logCollectionName]['status'] == 'fail') {
                        throw new \Exception();
                    }
                }
                foreach ($config['logs'] as $logCollectionName => $logCollection) {
                    $checks['log_collections']['checks'][$logCollectionName] = self::lintLogCollection($logCollectionName, $logCollection, $verifyLogFiles);
                    if ($checks['log_collections']['checks'][$logCollectionName]['status'] == 'fail') {
                        throw new \Exception();
                    }
                }
                $checks['log_collections']['status'] = 'ok';
            } catch (\Exception $e) {
                $checks['log_collections']['status'] = 'fail';
                $checks['log_collections']['error'] = $e->getMessage();
                $valid = false;
            }
        } catch (\Exception $e) {
            $valid = false;
        }

        return [
            'valid'  => $valid,
            'checks' => $checks,
        ];
    }