1 /**********************************************************************
2 * Copyright (c) 2012, 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 * Jonathan Rajotte - Utility function
12 *********************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.lttng2
.control
.core
.model
;
17 * Log Level enumeration.
19 * @author Bernd Hufmann
21 @SuppressWarnings("nls")
22 public enum TraceLogLevel
{
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
28 TRACE_EMERG("TRACE_EMERG"),
30 TRACE_ALERT("TRACE_ALERT"),
32 TRACE_CRIT("TRACE_CRIT"),
34 TRACE_ERR("TRACE_ERR"),
36 TRACE_WARNING("TRACE_WARNING"),
38 TRACE_NOTICE("TRACE_NOTICE"),
40 TRACE_INFO("TRACE_INFO"),
42 TRACE_DEBUG_SYSTEM("TRACE_DEBUG_SYSTEM"),
44 TRACE_DEBUG_PROGRAM("TRACE_DEBUG_PROGRAM"),
46 TRACE_DEBUG_PROCESS("TRACE_DEBUG_PROCESS"),
48 TRACE_DEBUG_MODULE("TRACE_DEBUG_MODULE"),
50 TRACE_DEBUG_UNIT("TRACE_DEBUG_UNIT"),
52 TRACE_DEBUG_FUNCTION("TRACE_DEBUG_FUNCTION"),
54 TRACE_DEBUG_LINE("TRACE_DEBUG_LINE"),
56 TRACE_DEBUG("TRACE_DEBUG"),
58 LEVEL_UNKNOWN("LEVEL_UNKNOWN");
60 // ------------------------------------------------------------------------
62 // ------------------------------------------------------------------------
66 private final String fInName
;
68 // ------------------------------------------------------------------------
70 // ------------------------------------------------------------------------
78 private TraceLogLevel(String name
) {
82 // ------------------------------------------------------------------------
84 // ------------------------------------------------------------------------
88 public String
getInName() {
92 // ------------------------------------------------------------------------
94 // ------------------------------------------------------------------------
96 * Return the corresponding {@link TraceLogLevel} to String "name"
99 * String to compare to retrieve the good {@link TraceLogLevel}
100 * @return the corresponding {@link TraceLogLevel}
102 public static TraceLogLevel
valueOfString(String name
) {
104 throw new IllegalArgumentException();
106 for (TraceLogLevel tllevel
: TraceLogLevel
.values()) {
107 if (tllevel
.getInName().equalsIgnoreCase(name
)) {
112 return LEVEL_UNKNOWN
;
This page took 0.035758 seconds and 5 git commands to generate.