Fix: JUL support multiple loglevels
[lttng-ust.git] / liblttng-ust-jul / org / lttng / ust / jul / LTTngEvent.java
1 /*
2 * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18 package org.lttng.ust.jul;
19
20 import java.util.ArrayList;
21 import java.lang.String;
22
23 import org.lttng.ust.jul.LTTngUst;
24
25 class LTTngLogLevel {
26 /* This level is a JUL int level value. */
27 public int level;
28 public int type;
29
30 public LTTngLogLevel(int level, int type) {
31 this.type = type;
32 this.level = level;
33 }
34 }
35
36 public class LTTngEvent {
37 /* Name of the event. */
38 public String name;
39 public ArrayList<LTTngLogLevel> logLevels = new ArrayList<LTTngLogLevel>();
40
41 public void addLogLevel(int loglevel, int loglevel_type) {
42 this.logLevels.add(new LTTngLogLevel(loglevel, loglevel_type));
43 }
44
45 public LTTngEvent(String name, int loglevel, int loglevel_type) {
46 this.name = name;
47 this.addLogLevel(loglevel, loglevel_type);
48 }
49 }
This page took 0.030122 seconds and 4 git commands to generate.