Add copyright header to all source files
[lttng-ust-java-tests.git] / src / test / java / org / lttng / ust / agent / integration / jul / JulTestUtils.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.jul;
20
21import java.util.logging.Level;
22import java.util.logging.Logger;
23
24final class JulTestUtils {
25
26 JulTestUtils() {
27 }
28
29 static void send10EventsTo(Logger logger) {
30 String a = new String("a");
31 Object[] params = { a, new String("b"), new Object() };
32
33 // Levels are FINE, FINER, FINEST, INFO, SEVERE, WARNING
34 logger.fine("A fine level message");
35 logger.finer("A finer level message");
36 logger.finest("A finest level message");
37 logger.info("A info level message");
38 logger.severe("A severe level message");
39 logger.warning("A warning level message");
40 logger.warning("Another warning level message");
41 logger.log(Level.WARNING, "A warning message using Logger.log()");
42 logger.log(Level.INFO, "A message with one parameter", a);
43 logger.log(Level.INFO, "A message with parameters", params);
44 }
45}
This page took 0.036963 seconds and 4 git commands to generate.