Commit | Line | Data |
---|---|---|
5b5ffa03 DG |
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 | ||
3c3a0129 | 20 | import java.util.ArrayList; |
5b5ffa03 DG |
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 | ||
3c3a0129 | 30 | public LTTngLogLevel(int level, int type) { |
5b5ffa03 DG |
31 | this.type = type; |
32 | this.level = level; | |
33 | } | |
34 | } | |
35 | ||
36 | public class LTTngEvent { | |
37 | /* Name of the event. */ | |
38 | public String name; | |
3c3a0129 DG |
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 | } | |
5b5ffa03 DG |
44 | |
45 | public LTTngEvent(String name, int loglevel, int loglevel_type) { | |
46 | this.name = name; | |
3c3a0129 | 47 | this.addLogLevel(loglevel, loglevel_type); |
5b5ffa03 DG |
48 | } |
49 | } |