File: log.cpp

package info (click to toggle)
opm-common 2022.10%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,468 kB
  • sloc: cpp: 164,554; python: 2,872; sh: 216; xml: 174; ansic: 149; pascal: 136; makefile: 12
file content (49 lines) | stat: -rw-r--r-- 898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <string>

#include <opm/common/OpmLog/OpmLog.hpp>

#include "export.hpp"

namespace {

void info(const std::string& msg) {
    OpmLog::info(msg);
}

void warning(const std::string& msg) {
    OpmLog::warning(msg);
}

void error(const std::string& msg) {
    OpmLog::error(msg);
}

void problem(const std::string& msg) {
    OpmLog::problem(msg);
}

void bug(const std::string& msg) {
    OpmLog::bug(msg);
}

void debug(const std::string& msg) {
    OpmLog::debug(msg);
}

void note(const std::string& msg) {
    OpmLog::note(msg);
}

}

void python::common::export_Log(py::module& module)
{
    py::class_<OpmLog>(module, "OpmLog")
        .def_static("info", info )
        .def_static("warning", warning)
        .def_static("error", error)
        .def_static("problem", problem)
        .def_static("bug", bug)
        .def_static("debug", debug)
        .def_static("note", note);
}