| 110 | } |
| 111 | |
| 112 | PyObject* |
| 113 | pycbc_logger__enable_protocol_logger__(PyObject* self, PyObject* args, PyObject* kwargs) |
| 114 | { |
| 115 | char* filename = nullptr; |
| 116 | const char* kw_list[] = { "filename", nullptr }; |
| 117 | const char* kw_format = "s"; |
| 118 | if (!PyArg_ParseTupleAndKeywords( |
| 119 | args, kwargs, kw_format, const_cast<char**>(kw_list), &filename)) { |
| 120 | return raise_invalid_argument( |
| 121 | "Cannot enable the protocol logger. Unable to parse args/kwargs.", __FILE__, __LINE__); |
| 122 | } |
| 123 | couchbase::core::logger::configuration configuration{}; |
| 124 | configuration.filename = std::string{ filename }; |
| 125 | couchbase::core::logger::create_protocol_logger(configuration); |
| 126 | Py_RETURN_NONE; |
| 127 | } |
| 128 | |
| 129 | PyObject* |
| 130 | pycbc_logger__is_console_logger__(PyObject* self, PyObject* Py_UNUSED(ignored)) |
nothing calls this directly
no test coverage detected