25 py::class_<std::exception>(module,
"STDException");
27 py::class_<ers::Issue, std::exception>(module,
"Issue");
29 py::class_<ers::OutputStream>(module,
"OutputStream");
32 py::class_<ers::AnyIssue, ers::Issue>(module,
"AnyIssue")
34 .def(py::init<const std::string&, const ers::Context&, const std::string&>())
36 .def(py::init<
const std::string&,
40 const system_clock::time_point&,
42 const std::vector<std::string>&,
43 const std::map<std::string, std::string>&,
56 py::class_<ers::Context>(module,
"Context")
73 py::class_<ers::LocalContext, ers::Context>(module,
"LocalContext")
74 .def(py::init<const char*, const char*, int, const char*, bool>());
76 py::class_<ers::RemoteProcessContext>(module,
"RemoteProcessContext")
77 .def(py::init<const std::string&, int, int, const std::string&, int, const std::string&, const std::string&>());
79 py::class_<ers::RemoteContext, ers::Context>(module,
"RemoteContext")
80 .def(py::init<const std::string&, const std::string&, int, const std::string&, ers::RemoteProcessContext&>());
83 py::class_<ers::Severity>(module,
"Severity")
84 .def(py::init<ers::severity&, int&>())
87 py::enum_<ers::severity>(module,
"severity")
97 module.def("debug", &ers::debug, "sends issue to the debug stream", py::arg("issue"), py::arg("level"));
98 module.def("log", &ers::log, "sends issue to the log stream", py::arg("issue"));
99 module.def("info", &ers::info, "sends issue to the information stream", py::arg("issue"));
100 module.def("warning", &ers::warning, "sends issue to the warning stream", py::arg("issue"));
101 module.def("error", &ers::error, "sends issue to the error stream", py::arg("issue"));
102 module.def("fatal", &ers::fatal, "sends issue to the fatal stream", py::arg("issue"));
103 module.def("debug_level", &ers::debug_level, "returns current debug level for ERS");
104 module.def("verbosity_level", &ers::verbosity_level, "returns current verbosity level for ERS");
105 module.def("enable_core_dump", &ers::enable_core_dump, "does what the name implies");
An abstract interface to access an Issue context.
virtual void *const * stack_symbols() const =0
virtual int line_number() const =0
virtual int stack_size() const =0
virtual const char * user_name() const =0
virtual int user_id() const =0
virtual pid_t thread_id() const =0
virtual const char * host_name() const =0
virtual pid_t process_id() const =0
virtual const char * package_name() const =0
virtual const char * application_name() const =0
virtual const char * file_name() const =0
virtual const char * cwd() const =0
virtual const char * function_name() const =0