Search in sources :

Example 31 with Logger

use of ch.qos.logback.classic.Logger in project webofneeds by researchstudio-sat.

the class ProposesCancelledAgreementTest method setLogLevel.

@BeforeClass
public static void setLogLevel() {
    Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    root.setLevel(Level.INFO);
}
Also used : Logger(ch.qos.logback.classic.Logger) BeforeClass(org.junit.BeforeClass)

Example 32 with Logger

use of ch.qos.logback.classic.Logger in project webofneeds by researchstudio-sat.

the class GetProposalsTests method main.

public static void main(String... args) throws Exception {
    Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    root.setLevel(Level.INFO);
    // condense test cases
    // read datasets (input and expected output)
    // modify input, removing graphs and triples until the test breaks
    String outputPath = "src/test/resources/won/utils/agreement/condensed/";
    String inputPath = "src/test/resources/won/utils/agreement/input/";
    Stream<Path> resources = Files.list(Paths.get(inputPath));
    resources.forEach(resource -> {
        try {
            System.out.println("trying to condense: " + resource.toAbsolutePath().toString());
            condenseTestCaseByQuery(resource, outputPath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    });
}
Also used : Path(java.nio.file.Path) Logger(ch.qos.logback.classic.Logger)

Example 33 with Logger

use of ch.qos.logback.classic.Logger in project webofneeds by researchstudio-sat.

the class AcceptedRetractsTest method setLogLevel.

@BeforeClass
public static void setLogLevel() {
    Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    root.setLevel(Level.INFO);
}
Also used : Logger(ch.qos.logback.classic.Logger) BeforeClass(org.junit.BeforeClass)

Example 34 with Logger

use of ch.qos.logback.classic.Logger in project webofneeds by researchstudio-sat.

the class AcknowledgementProtocolTest method setLogLevel.

@BeforeClass
public static void setLogLevel() {
    Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    root.setLevel(Level.INFO);
}
Also used : Logger(ch.qos.logback.classic.Logger) BeforeClass(org.junit.BeforeClass)

Example 35 with Logger

use of ch.qos.logback.classic.Logger in project webofneeds by researchstudio-sat.

the class AgreementProtocolTest method main.

public static void main(String... args) throws Exception {
    Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
    root.setLevel(Level.INFO);
    // condense test cases
    // read datasets (input and expected output)
    // modify input, removing graphs and triples until the test breaks
    String outputPath = "src/test/resources/won/utils/agreement/condensed/";
    String inputPath = "src/test/resources/won/utils/agreement/input/";
    Stream<Path> resources = Files.list(Paths.get(inputPath));
    resources.forEach(resource -> {
        try {
            System.out.println("trying to condense: " + resource.toAbsolutePath().toString());
            condenseTestCaseByQuery(resource, outputPath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    });
}
Also used : Path(java.nio.file.Path) Logger(ch.qos.logback.classic.Logger)

Aggregations

Logger (ch.qos.logback.classic.Logger)339 ILoggingEvent (ch.qos.logback.classic.spi.ILoggingEvent)90 LoggerContext (ch.qos.logback.classic.LoggerContext)86 Test (org.junit.Test)78 Appender (ch.qos.logback.core.Appender)30 BeforeClass (org.junit.BeforeClass)28 FileAppender (ch.qos.logback.core.FileAppender)27 Test (org.junit.jupiter.api.Test)27 ConsoleAppender (ch.qos.logback.core.ConsoleAppender)22 File (java.io.File)21 PatternLayoutEncoder (ch.qos.logback.classic.encoder.PatternLayoutEncoder)20 Level (ch.qos.logback.classic.Level)18 ListAppender (ch.qos.logback.core.read.ListAppender)14 RollingFileAppender (ch.qos.logback.core.rolling.RollingFileAppender)12 ArrayList (java.util.ArrayList)11 Before (org.junit.Before)11 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)11 Map (java.util.Map)10 AsyncLoggingEventAppenderFactory (io.dropwizard.logging.async.AsyncLoggingEventAppenderFactory)9 DropwizardLayoutFactory (io.dropwizard.logging.layout.DropwizardLayoutFactory)8