12#include "MantidKernel/DllConfig.h"
15#include <Poco/Message.h>
61 void setName(
const std::string &
name);
64 void fatal(
const std::string &msg);
66 void error(
const std::string &msg);
68 void warning(
const std::string &msg);
70 void notice(
const std::string &msg);
72 void information(
const std::string &msg);
74 void debug(
const std::string &msg);
76 void accumulate(
const std::string &msg);
82 void flushInformation();
90 std::ostream &fatal();
92 std::ostream &
error();
94 std::ostream &warning();
96 std::ostream ¬ice();
98 std::ostream &information();
100 std::ostream &debug();
103 void log(
const std::string &message,
const Priority &priority);
106 std::ostream &getLogStream(
const Priority &priority);
109 void dump(
const std::string &msg,
const void *buffer, std::size_t length);
112 void setLevel(
int level);
115 void setLevelOffset(
int level);
118 int getLevelOffset()
const;
121 int getLevel()
const;
123 std::string getLevelName()
const;
126 void setLevel(
const std::string &level);
129 bool getEnabled()
const;
132 void setEnabled(
const bool enabled);
135 bool is(
int level)
const;
138 bool isDebug()
const;
142 static void setLevelForAll(
const int level);
143 static void setLevelForAll(
const std::string &level);
146 static void shutdown();
The Logger class is in charge of the publishing messages from the framework through various channels.
bool m_enabled
The state of this logger, disabled loggers send no messages.
Poco::Message::Priority Priority
Poco::Logger * m_log
Internal handle to third party logging objects.
Logger & operator=(const Logger &)
Disable assignment.
std::unique_ptr< ThreadSafeLogStream > m_logStream
Allows stream operators for a logger.
static const std::array< std::string, 9 > PriorityNames
Logger(const Logger &)
Disable copying.
int m_levelOffset
The offset of the logger.
Helper class which provides the Collimation Length for SANS instruments.