From: Jamie C. <jca...@we...> - 2014-03-02 19:59:41
|
On 01/Mar/2014 19:25 marty leisner <mal...@gm...> wrote .. > I'm writing custom modules and have the following requirements: > a) all actions need to log > b) xml-rpc needs to be able to trigger the actions > > It appears logging is modules written and I've seen it in the .cgi > scripts. Is there any logging "inherent" in webmin, or is it all module > driven. There is basic webserver logging to /var/webmin/miniserv.log , but this doesn't have the same detail as what you can get by calling webmin_log. > It looks like the .cgi scripts aren't accessabile from xml-rpc -- I suppose > to access the "actions" from xml-rpc I'd need to either > 1) put the actions in a method in the library (and invoke it from > both the cgi and the xml-rpc) Yes, that is correct. In an ideal module the CGI script would have very little actual functionality, and instead would call functions in your .pl file to do the real work. These could then also be called via XML-RPC. > 2) have a method in the library to invoke a .cgi script (in which case > the CGI script run without a GUI) I wouldn't recommend going this route. - Jamie |