1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s4:param add log_level function to retrieve log level in Python code

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Christian Ambach
2016-09-13 10:48:03 +02:00
parent e62ff6c41d
commit 7ba50a2009

View File

@ -322,6 +322,13 @@ static PyObject *py_lp_dump_a_parameter(PyObject *self, PyObject *args)
}
static PyObject *py_lp_log_level(PyObject *self, PyObject *unused)
{
int ret = DEBUGLEVEL_CLASS[DBGC_CLASS];
return PyInt_FromLong(ret);
}
static PyObject *py_samdb_url(PyObject *self, PyObject *unused)
{
struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self);
@ -357,6 +364,8 @@ static PyMethodDef py_lp_ctx_methods[] = {
"Get the server role." },
{ "dump", py_lp_dump, METH_VARARGS,
"S.dump(stream, show_defaults=False)" },
{ "log_level", py_lp_log_level, METH_NOARGS,
"S.log_level() -> int\n Get the active log level" },
{ "dump_a_parameter", py_lp_dump_a_parameter, METH_VARARGS,
"S.dump_a_parameter(stream, name, service_name)" },
{ "samdb_url", py_samdb_url, METH_NOARGS,