MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / register_logging

Function register_logging

python/cpp/logging.cc:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 namespace python {
7
8 void register_logging(py::module& m) {
9 py::enum_<ctranslate2::LogLevel>(m, "LogLevel")
10 .value("Off", ctranslate2::LogLevel::Off)
11 .value("Critical", ctranslate2::LogLevel::Critical)
12 .value("Error", ctranslate2::LogLevel::Error)
13 .value("Warning", ctranslate2::LogLevel::Warning)
14 .value("Info", ctranslate2::LogLevel::Info)
15 .value("Debug", ctranslate2::LogLevel::Debug)
16 .value("Trace", ctranslate2::LogLevel::Trace)
17 .export_values();
18
19 m.def("set_log_level", &ctranslate2::set_log_level);
20 m.def("get_log_level", &ctranslate2::get_log_level);
21 }
22
23 }
24}

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected