On Mon, Feb 11, 2002 at 06:31:25PM -0800, Randy J. Ray wrote: > > * If I install a handler for PerlLogHandler, does the normal logging still > take place? Is it a function of whether my handler returns OK, DECLINED, > etc.?
As far as I know return codes are ignored. This means that all logging (and cleanup) handlers are called for each request. > * Are there ways to register other log types, in addition to the access, > error, etc.? Such that people could specify those (and a format) the > same way they specify the others? More to the point, so that there > might be a ready file-descriptor I could print to, rather than having to > deal with the open/lock/write/unlock/close cycle. Apache::LogFile (section 16.2) is what you are looking for. It gives you a global filehandle that you can print to as much as you care to. > To explain, I am looking at ways to expand the logging capability in my > Apache::RPC::Server class. I'd like at the very least to be able to alter the > URI part such that it reflects the procedure name that was called (this I > understand how to do). Ideally, I'd like to either write completely different > lines out to the access log, or (preferable) write to a separate log entirely, > so that tracking usage statistics is made that much easier. If I go the > separate log route, I don't want the server to be weighted down by the > repetitive open/close cycle on the files. You might also want to consider setting a notes value for each piece of information you want to log. This is detailed in section 16.4 of the cookbook. It's dead simple, just add this to your httpd.conf: LogFormat "%{RPC_NAME}n %{RPC_ARGS}n %{RPC_RESULTS}n" rpc_log_format <Location /RPCSERV> CustomLog logs/rpc_log rpc_log_format </Location> and then somewhere in your code do this: $r->notes('RPC_NAME', $cow); $r->notes('RPC_ARGS', $moo); $r->notes('RPC_RESULTS', $milk); -- Paul Lindner [EMAIL PROTECTED] ||||| | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org/ Human Rights Declaration http://www.unhchr.ch/udhr/index.htm