summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-07-29 00:05:17 +0000
committerTim Potter <tpot@samba.org>2003-07-29 00:05:17 +0000
commit84d98dd46037341cc651efcd710044a8989f032e (patch)
treea62bacbcb9115f47ce3d05d0aac50a9bd05cc646 /source3
parentd82199a61b7a768a64757d2998d7d4bc76b650bb (diff)
downloadsamba-84d98dd46037341cc651efcd710044a8989f032e.tar.gz
samba-84d98dd46037341cc651efcd710044a8989f032e.tar.bz2
samba-84d98dd46037341cc651efcd710044a8989f032e.zip
Add debug output api's from lsa/spoolss modules to smb module. Patch
from Brett A. Funderburg. (This used to be commit 2cedaff044e5a5a03482b1e8f211218db5394930)
Diffstat (limited to 'source3')
-rw-r--r--source3/python/py_smb.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c
index af2949f708..bb84a337c9 100644
--- a/source3/python/py_smb.c
+++ b/source3/python/py_smb.c
@@ -343,6 +343,38 @@ static PyMethodDef smb_methods[] = {
{ "connect", (PyCFunction)py_smb_connect, METH_VARARGS | METH_KEYWORDS,
"Connect to a host" },
+ /* Other stuff - this should really go into a samba config module
+ but for the moment let's leave it here. */
+
+ { "setup_logging", (PyCFunction)py_setup_logging,
+ METH_VARARGS | METH_KEYWORDS,
+ "Set up debug logging.\n"
+"\n"
+"Initialises Samba's debug logging system. One argument is expected which\n"
+"is a boolean specifying whether debugging is interactive and sent to stdout\n"
+"or logged to a file.\n"
+"\n"
+"Example:\n"
+"\n"
+">>> smb.setup_logging(interactive = 1)" },
+
+ { "get_debuglevel", (PyCFunction)get_debuglevel,
+ METH_VARARGS,
+ "Set the current debug level.\n"
+"\n"
+"Example:\n"
+"\n"
+">>> smb.get_debuglevel()\n"
+"0" },
+
+ { "set_debuglevel", (PyCFunction)set_debuglevel,
+ METH_VARARGS,
+ "Get the current debug level.\n"
+"\n"
+"Example:\n"
+"\n"
+">>> smb.set_debuglevel(10)" },
+
{ NULL }
};
@@ -401,5 +433,5 @@ void initsmb(void)
py_samba_init();
setup_logging("smb", True);
- DEBUGLEVEL = 10;
+ DEBUGLEVEL = 3;
}