All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.shaft.tools.io.ReportManager Maven / Gradle / Ivy

Go to download

SHAFT is a unified test automation engine. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve. Stop reinventing the wheel. Upgrade now!

There is a newer version: 8.2.20240402
Show newest version
package com.shaft.tools.io;

import org.apache.logging.log4j.Level;

import static com.shaft.tools.io.internal.ReportManagerHelper.*;

public class ReportManager {

    private ReportManager() {
        throw new IllegalStateException("Utility class");
    }

    /**
     * Creates a custom log entry that will also be added as a step in the execution report
     *
     * @param logText the text that will be logged by action
     */
    public static void log(String logText) {
        if (getDiscreteLogging() && !logText.toLowerCase().contains("failed") && isInternalStep()) {
            createLogEntry(logText, Level.INFO);
        } else {
            writeStepToReport(logText);
        }
    }

    /**
     * Creates a custom log entry that will not be added as a step in the execution report, but you can see it in the attached execution log txt file
     *
     * @param logText the text that will be logged by action
     */
    public static void logDiscrete(String logText) {
        createLogEntry(logText, Level.INFO);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy