use of com.trivago.logging.CucableLogger.CucableLogLevel in project cucable-plugin by trivago.
the class PropertyManager method logProperties.
/**
* Logs all passed property values.
*/
public void logProperties() {
CucableLogLevel[] logLevels = new CucableLogLevel[] { DEFAULT, COMPACT };
if (!isCucumberFeatureListFileSource()) {
logger.info("- sourceFeatures:", logLevels);
} else {
logger.info(String.format("- sourceFeatures from file %s:", cucumberFeatureListFile), logLevels);
}
if (sourceFeatures != null) {
for (CucableFeature sourceFeature : sourceFeatures) {
String logLine = " - " + sourceFeature.getName();
if (sourceFeature.hasValidScenarioLineNumbers()) {
List<Integer> lineNumbers = sourceFeature.getLineNumbers();
logLine += String.format(" (%s %s)", Language.singularPlural(lineNumbers.size(), "line", "lines"), lineNumbers.stream().map(String::valueOf).collect(Collectors.joining(",")));
}
logger.info(logLine, logLevels);
}
}
logger.info(String.format("- sourceRunnerTemplateFile : %s", sourceRunnerTemplateFile), logLevels);
logger.logInfoSeparator(DEFAULT);
logger.info(String.format("- generatedRunnerDirectory : %s", generatedRunnerDirectory), logLevels);
logger.info(String.format("- generatedFeatureDirectory : %s", generatedFeatureDirectory), logLevels);
logger.logInfoSeparator(DEFAULT);
if (includeScenarioTags != null && !includeScenarioTags.isEmpty()) {
logger.info(String.format("- includeScenarioTags : %s", String.join(", ", includeScenarioTags)), logLevels);
}
if (customPlaceholders != null && !customPlaceholders.isEmpty()) {
logger.info("- customPlaceholders :", logLevels);
for (Map.Entry<String, String> customPlaceholder : customPlaceholders.entrySet()) {
logger.info(String.format(" %s => %s", customPlaceholder.getKey(), customPlaceholder.getValue()), logLevels);
}
}
logger.info(String.format("- parallelizationMode : %s", parallelizationMode.name().toLowerCase()), logLevels);
logger.info(String.format("- numberOfTestRuns : %d", numberOfTestRuns), logLevels);
if (desiredNumberOfRunners > 0) {
logger.info(String.format("- desiredNumberOfRunners : %d", desiredNumberOfRunners), logLevels);
}
logger.logInfoSeparator(logLevels);
}
Aggregations