client-cpp  0.0.1-SNAPSHOT
ILogger.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ILOGGER_HPP_
18 #define ILOGGER_HPP_
19 
20 #include <boost/smart_ptr/shared_ptr.hpp>
21 
22 namespace kaa {
23 
24 enum class LogLevel {
25  FINE_TRACE = 0,
26  DEBUG,
27  TRACE,
28  INFO,
29  WARNING,
30  ERROR,
31  FATAL
32 };
33 
34 class ILogger {
35 public:
36  virtual ~ILogger() {}
37 
38  virtual void ftrace (const char *message) const = 0;
39  virtual void debug (const char *message) const = 0;
40  virtual void trace (const char *message) const = 0;
41  virtual void info (const char *message) const = 0;
42  virtual void warn (const char *message) const = 0;
43  virtual void error (const char *message) const = 0;
44  virtual void fatal (const char *message) const = 0;
45 
46  virtual void log(LogLevel level, const char *message) const = 0;
47 };
48 
49 typedef boost::shared_ptr<ILogger> LoggerPtr;
50 
51 } // namespace kaa
52 
53 
54 #endif /* ILOGGER_HPP_ */
virtual void info(const char *message) const =0
virtual void warn(const char *message) const =0
virtual void log(LogLevel level, const char *message) const =0
LogLevel
Definition: ILogger.hpp:24
boost::shared_ptr< ILogger > LoggerPtr
Definition: ILogger.hpp:49
virtual void error(const char *message) const =0
virtual void trace(const char *message) const =0
virtual ~ILogger()
Definition: ILogger.hpp:36
virtual void fatal(const char *message) const =0
virtual void debug(const char *message) const =0
virtual void ftrace(const char *message) const =0