Mantid
Loading...
Searching...
No Matches
PythonLoggingChannel.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7//
8// PythonLoggingChannel.h
9//
10// Channel for logging. Sends messages to Python's standard library logging framework.
11// Usage: use it in Mantid.properties or mantid.user.properties in addition to, or
12// instead of other channel classes.
13//
14
15#pragma once
16
17// local includes
20
21// 3rd-party includes
22#include <Poco/ConsoleChannel.h>
23#include <boost/python/object.hpp>
24#include <memory>
25
26namespace Poco {
27
29public:
31 ~PythonLoggingChannel() override;
32 // Because of boost::python::object
35 // Because of Poco::Channel
38
39 void log(const Poco::Message &msg) override;
40
41private:
42 std::unique_ptr<boost::python::object> m_pyLogger;
43};
44
45} // namespace Poco
std::unique_ptr< boost::python::object > m_pyLogger
PythonLoggingChannel & operator=(PythonLoggingChannel &&)=delete
PythonLoggingChannel(PythonLoggingChannel &&)=delete
PythonLoggingChannel & operator=(const PythonLoggingChannel &)=delete
PythonLoggingChannel(const PythonLoggingChannel &)=delete
#define MANTID_PYTHONINTERFACE_CORE_DLL
Definition: DllConfig.h:17
Definition: Algorithm.h:30