about summary refs log tree commit diff stats
path: root/src/plugins/python_api.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-06-23 00:36:26 +0100
committerJames Booth <boothj5@gmail.com>2016-06-23 00:36:26 +0100
commit1e37b755fe4030586b6994c397ddc855a659af43 (patch)
tree17d705b3578a7d9870992d7a59f51ffd8f37186e /src/plugins/python_api.c
parentc6288d89f9682ee090f5776956cc2e6e8e6889bc (diff)
downloadprofani-tty-1e37b755fe4030586b6994c397ddc855a659af43.tar.gz
Add macro for C plugins register_timed
Diffstat (limited to 'src/plugins/python_api.c')
-rw-r--r--src/plugins/python_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c
index e0222e8d..a5c5d73c 100644
--- a/src/plugins/python_api.c
+++ b/src/plugins/python_api.c
@@ -119,6 +119,9 @@ python_api_register_command(PyObject *self, PyObject *args)
         return Py_BuildValue("");
     }
 
+    char *plugin_name = _python_plugin_name();
+    log_debug("Register command %s for %s", command_name, plugin_name);
+
     if (p_callback && PyCallable_Check(p_callback)) {
         Py_ssize_t len = PyList_Size(synopsis);
         const char *c_synopsis[len == 0 ? 0 : len+1];
@@ -161,9 +164,6 @@ python_api_register_command(PyObject *self, PyObject *args)
         }
         c_examples[len] = NULL;
 
-        char *plugin_name = _python_plugin_name();
-        log_debug("FILENAME : %s", plugin_name);
-
         allow_python_threads();
         api_register_command(command_name, min_args, max_args, c_synopsis,
             description, c_arguments, c_examples, p_callback, python_command_callback);
@@ -176,6 +176,9 @@ python_api_register_command(PyObject *self, PyObject *args)
 static PyObject *
 python_api_register_timed(PyObject *self, PyObject *args)
 {
+    char *plugin_name = _python_plugin_name();
+    log_debug("Register timed for %s", plugin_name);
+
     PyObject *p_callback = NULL;
     int interval_seconds = 0;