Just to add to the discussion, I'll tell you how I thought about logging the python backend XMLRPC API calls. This needs a lot less filtering than logging the WebUI though, since we're interested in most of the methods, so it's a lot easier.

We decided we only wanted to log successful API calls that are deemed "important". So far this means that the api method requires authentication (and therefore the systemid XML) file to be sent with it.

In the apacheRequest, after the function is called and before the response is sent back, an auditlog function is called with all the information about the XMLRPC method that was called, its arguments and the request. I think this is the only central place from which the logging function can be called. The auditlog function belongs to a separate module and it does all the processing to extract the information that we deem useful (ips/hosts/serverId etc.). It also decides if the call is important enough to be logged or just doesn't do anything if auditlogging is turned off in an rhn.conf file. It calls the auditlogging XMLRPC server with the result and also crashes the whole API request if anything goes wrong with the logging.

Feedback appreciated :)

-Ionuț

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to