activemq-cpp-3.8.2
Level.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DECAF_UTIL_LOGGING_LEVEL_H_
19 #define _DECAF_UTIL_LOGGING_LEVEL_H_
20 
21 #include <decaf/util/Config.h>
22 
23 #include <decaf/lang/Comparable.h>
25 
26 namespace decaf {
27 namespace util {
28 namespace logging {
29 
56  class DECAF_API Level : public decaf::lang::Comparable<Level> {
57  private:
58 
59  std::string name;
60  int value;
61 
62  public:
63 
68  static const Level INHERIT;
69 
74  static const Level OFF;
75 
83  static const Level SEVERE;
84 
91  static const Level WARNING;
92 
100  static const Level INFO;
101 
110  static const Level DEBUG;
111 
120  static const Level CONFIG;
121 
137  static const Level FINE;
138 
144  static const Level FINER;
145 
149  static const Level FINEST;
150 
155  static const Level ALL;
156 
157  protected:
158 
167  Level( const std::string& name, int value );
168 
169  public:
170 
171  virtual ~Level();
172 
176  int intValue() const {
177  return this->value;
178  }
179 
183  std::string getName() const {
184  return this->name;
185  }
186 
190  std::string toString() const {
191  return this->name;
192  }
193 
194  public: // Comparable
195 
196  virtual int compareTo( const Level& value ) const;
197 
198  virtual bool equals( const Level& value ) const;
199 
200  virtual bool operator==( const Level& value ) const;
201 
202  virtual bool operator<( const Level& value ) const;
203 
204  public:
205 
226  static Level parse( const std::string& name );
227 
228  };
229 
230 }}}
231 
232 #endif /* _DECAF_UTIL_LOGGING_LEVEL_H_ */
static const Level FINE
FINE is a message level providing tracing information.
Definition: Level.h:137
static const Level WARNING
WARNING is a message level indicating a potential problem.
Definition: Level.h:91
static const Level INFO
INFO is a message level for informational messages.
Definition: Level.h:100
The Level class defines a set of standard logging levels that can be used to control logging output...
Definition: Level.h:56
static const Level SEVERE
SEVERE is a message level indicating a serious failure.
Definition: Level.h:83
static const Level DEBUG
DEBUG is a level for more verbose informative messages.
Definition: Level.h:110
static const Level FINER
FINER indicates a fairly detailed tracing message.
Definition: Level.h:144
static const Level ALL
ALL indicates that all messages should be logged.
Definition: Level.h:155
int intValue() const
Definition: Level.h:176
std::string getName() const
Definition: Level.h:183
static const Level CONFIG
CONFIG is a message level for static configuration messages.
Definition: Level.h:120
std::string toString() const
Definition: Level.h:190
static const Level OFF
OFF is a special level that can be used to turn off logging.
Definition: Level.h:74
static const Level FINEST
FINEST indicates a highly detailed tracing message.
Definition: Level.h:149
#define DECAF_API
Definition: Config.h:29
bool operator==(const ArrayPointer< T > &left, const U *right)
Definition: ArrayPointer.h:379
This interface imposes a total ordering on the objects of each class that implements it...
Definition: Comparable.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25
static const Level INHERIT
NULL is a special level that indicates that the Logger should get its Level from its parent Logger...
Definition: Level.h:68