X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Flttng%2Fust%2Fagent%2Fintegration%2Flog4j%2FLog4jTestUtils.java;fp=src%2Ftest%2Fjava%2Forg%2Flttng%2Fust%2Fagent%2Fintegration%2Flog4j%2FLog4jTestUtils.java;h=d10ad3d9983f600331c507813b96ad266ade17d1;hb=24b260d9fe97bdd0b9538d3cf197e9e3278c7e85;hp=0000000000000000000000000000000000000000;hpb=e41ec02aad337ff074f5209ee11fe2c8edb87a81;p=lttng-ust-java-tests.git diff --git a/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jTestUtils.java b/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jTestUtils.java new file mode 100644 index 0000000..d10ad3d --- /dev/null +++ b/src/test/java/org/lttng/ust/agent/integration/log4j/Log4jTestUtils.java @@ -0,0 +1,26 @@ +package org.lttng.ust.agent.integration.log4j; + +import java.io.IOException; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; + +final class Log4jTestUtils { + + private Log4jTestUtils() { + } + + static void send10Events(Logger logger) { + // Levels/priorities are DEBUG, ERROR, FATAL, INFO, TRACE, WARN + logger.debug("Debug message. Lost among so many."); + logger.debug("Debug message with a throwable", new IOException()); + logger.error("Error messsage. This might be bad."); + logger.error("Error message with a throwable", new IOException()); + logger.fatal("A fatal message. You are already dead."); + logger.info("A info message. Lol, who cares."); + logger.trace("A trace message. No, no *that* trace"); + logger.warn("A warn message. Yellow underline."); + logger.log(Level.DEBUG, "A debug message using .log()"); + logger.log(Level.ERROR, "A error message using .log()"); + } +}