mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
debugging
This commit is contained in:
parent
385941d75e
commit
cf5978d730
@ -46,6 +46,7 @@ void error(const char *location, const char *msg){
|
|||||||
inline std::string NowTime();
|
inline std::string NowTime();
|
||||||
|
|
||||||
enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5};
|
enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logDEBUG5};
|
||||||
|
static const char TLevelValues[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4","DEBUG5"};
|
||||||
|
|
||||||
template <typename T> class Log{
|
template <typename T> class Log{
|
||||||
public:
|
public:
|
||||||
@ -169,8 +170,9 @@ template <typename T> TLogLevel& Log<T>::ReportingLevel()
|
|||||||
|
|
||||||
template <typename T> std::string Log<T>::ToString(TLogLevel level)
|
template <typename T> std::string Log<T>::ToString(TLogLevel level)
|
||||||
{
|
{
|
||||||
static const char* const buffer[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4","DEBUG5"};
|
/*static const char* const buffer[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4","DEBUG5"};
|
||||||
return buffer[level];
|
return buffer[level];*/
|
||||||
|
return TLevelValues[level];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user