Graham Dumpleton
grahamd at dscpl.com.au
Tue Mar 8 20:53:38 EST 2005
Not sure that everything you might want is available or not. Access is provided to: log_error(message[, level]) An interface to the Apache ap_log_rerror function. message is a string with the error message, level is one of the following flags constants: APLOG_EMERG APLOG_ALERT APLOG_CRIT APLOG_ERR APLOG_WARNING APLOG_NOTICE APLOG_INFO APLOG_DEBUG APLOG_NOERRNO If you need to write to log and do not have a reference to a request object, use the apache.log_error function. This is in the request object and is documented in: http://www.modpython.org/live/current/doc-html/pyapi-mprequest-meth.html There also is mod_python.apache.log_error() which does the same thing. There is something about log levels in the server object. http://www.modpython.org/live/current/doc-html/pyapi-mpsrv-mem.html You can also supply a log handler. http://www.modpython.org/live/current/doc-html/dir-handlers-plh.html I can't remember any other log related stuff at the moment. Am not sure what you mean by "In addition, is that possible for us to create a hook in mod_python so that other modules can call it?". Can you elaborate? Graham Kevin Wang wrote .. > Hi All, > > Does mod_python expose Apache's log api, for example, ap_log_error() and > ap_log_rerror(), to mod_python's applications? If not, how can we access > Apache's log api, or should we use our own logging? > > In addition, is that possible for us to create a hook in mod_python so > that > other modules can call it? > > I am not quite sure if this is the right mailing list for these questions. > If not, should I send it to python-dev at httpd.apache.org? > > Thanks. > > -- Kevin > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|