Add filter notifications and TCP client tests
[lttng-ust-java-tests.git] / lttng-ust-java-tests / src / test / java / org / lttng / ust / agent / integration / log4j / Log4jTestUtils.java
CommitLineData
2b408e85
AM
1/*
2 * Copyright (C) 2015, EfficiOS Inc., Alexandre Montplaisir <alexmonthy@efficios.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
8576633f
AM
19package org.lttng.ust.agent.integration.log4j;
20
21import java.io.IOException;
22
23import org.apache.log4j.Level;
24import org.apache.log4j.Logger;
25
8a0613fa
AM
26/**
27 * Utility methods for log4j tests
28 */
8576633f
AM
29final class Log4jTestUtils {
30
31 private Log4jTestUtils() {
32 }
33
34 static void send10Events(Logger logger) {
35 // Levels/priorities are DEBUG, ERROR, FATAL, INFO, TRACE, WARN
36 logger.debug("Debug message. Lost among so many.");
37 logger.debug("Debug message with a throwable", new IOException());
38 logger.error("Error messsage. This might be bad.");
39 logger.error("Error message with a throwable", new IOException());
40 logger.fatal("A fatal message. You are already dead.");
41 logger.info("A info message. Lol, who cares.");
42 logger.trace("A trace message. No, no *that* trace");
43 logger.warn("A warn message. Yellow underline.");
44 logger.log(Level.DEBUG, "A debug message using .log()");
45 logger.log(Level.ERROR, "A error message using .log()");
46 }
47}
This page took 0.02496 seconds and 4 git commands to generate.