MCPcopy Create free account
hub / github.com/couchbase/couchbase-python-client / pycbc_logger__enable_protocol_logger__

Function pycbc_logger__enable_protocol_logger__

src/logger.cxx:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112PyObject*
113pycbc_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
129PyObject*
130pycbc_logger__is_console_logger__(PyObject* self, PyObject* Py_UNUSED(ignored))

Callers

nothing calls this directly

Calls 1

raise_invalid_argumentFunction · 0.85

Tested by

no test coverage detected