MachineIntelligenceCore:Toolchain
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
LoggerOutput.hpp
Go to the documentation of this file.
1
23
#ifndef SRC_CONFIGURATION_LOGGEROUTPUT_HPP_
24
#define SRC_CONFIGURATION_LOGGEROUTPUT_HPP_
25
26
#include <
logger/LoggerAux.hpp
>
27
28
29
namespace
mic {
30
namespace
logger {
31
36
class
LoggerOutput
{
37
public
:
42
LoggerOutput
(
Severity_t
sev =
LINFO
) :
lvl
(sev)
43
{
44
45
}
46
50
virtual
~LoggerOutput
(){}
51
52
62
virtual
void
print
(
const
std::string & msg_,
Severity_t
severity_,
const
std::string & file_,
int
line_)
const
= 0;
63
68
void
setLvl
(
Severity_t
sev) {
69
lvl
= sev;
70
}
71
75
void
incrementLvl
() {
76
if
(
lvl
<
LFATAL
)
77
lvl
= (
Severity_t
)(
lvl
+1);
78
}
79
83
void
decrementLvl
() {
84
if
(
lvl
>
LTRACE
)
85
lvl
= (
Severity_t
)(
lvl
-1);
86
}
87
88
93
Severity_t
getLvl
()
const
{
94
return
lvl
;
95
}
96
97
protected
:
101
Severity_t
lvl
;
102
};
103
104
105
106
}
/* namespace logger */
107
}
/* namespace mic */
108
109
110
#endif
/* SRC_CONFIGURATION_LOGGEROUTPUT_HPP_ */
mic::logger::Severity_t
Severity_t
Message severity level.
Definition:
LoggerAux.hpp:35
mic::logger::LoggerOutput::~LoggerOutput
virtual ~LoggerOutput()
Definition:
LoggerOutput.hpp:50
LINFO
#define LINFO
Definition:
LoggerAux.hpp:55
mic::logger::LoggerOutput::decrementLvl
void decrementLvl()
Definition:
LoggerOutput.hpp:83
mic::logger::LoggerOutput::getLvl
Severity_t getLvl() const
Definition:
LoggerOutput.hpp:93
LTRACE
#define LTRACE
Definition:
LoggerAux.hpp:52
LFATAL
#define LFATAL
Definition:
LoggerAux.hpp:59
mic::logger::LoggerOutput::setLvl
void setLvl(Severity_t sev)
Definition:
LoggerOutput.hpp:68
mic::logger::LoggerOutput
Abstract interface for different logger outputs.
Definition:
LoggerOutput.hpp:36
LoggerAux.hpp
Contains declarations of logger auxiliary functions, macros and severity type.
mic::logger::LoggerOutput::print
virtual void print(const std::string &msg_, Severity_t severity_, const std::string &file_, int line_) const =0
Logs given message. Depending on actual implementation, it can be printed on terminal, ncurses window, file etc.
mic::logger::LoggerOutput::LoggerOutput
LoggerOutput(Severity_t sev=LINFO)
Definition:
LoggerOutput.hpp:42
mic::logger::LoggerOutput::incrementLvl
void incrementLvl()
Definition:
LoggerOutput.hpp:75
mic::logger::LoggerOutput::lvl
Severity_t lvl
Definition:
LoggerOutput.hpp:101
src
logger
LoggerOutput.hpp
Generated on Wed Feb 6 2019 00:39:40 for MachineIntelligenceCore:Toolchain by
1.8.6