| 1 | package org.lttng.ust.agent.integration.log4j; |
| 2 | |
| 3 | import java.io.IOException; |
| 4 | |
| 5 | import org.apache.log4j.Level; |
| 6 | import org.apache.log4j.Logger; |
| 7 | |
| 8 | final class Log4jTestUtils { |
| 9 | |
| 10 | private Log4jTestUtils() { |
| 11 | } |
| 12 | |
| 13 | static void send10Events(Logger logger) { |
| 14 | // Levels/priorities are DEBUG, ERROR, FATAL, INFO, TRACE, WARN |
| 15 | logger.debug("Debug message. Lost among so many."); |
| 16 | logger.debug("Debug message with a throwable", new IOException()); |
| 17 | logger.error("Error messsage. This might be bad."); |
| 18 | logger.error("Error message with a throwable", new IOException()); |
| 19 | logger.fatal("A fatal message. You are already dead."); |
| 20 | logger.info("A info message. Lol, who cares."); |
| 21 | logger.trace("A trace message. No, no *that* trace"); |
| 22 | logger.warn("A warn message. Yellow underline."); |
| 23 | logger.log(Level.DEBUG, "A debug message using .log()"); |
| 24 | logger.log(Level.ERROR, "A error message using .log()"); |
| 25 | } |
| 26 | } |