Hello,
I'm trying to create a way for developers on our Mason app, to be able to dump
to our apache error_log, the full component execution chain for any request
that Mason handles. I followed the documentation here:
http://www.masonbook.com/book/chapter-6.mhtml
http://www.masonhq.com/docs/manual/Params.html#preprocess
... but am not having any luck.
Here is what I have:
In httpd.conf:
-------------------------------
PerlSetVar MasonPreprocess "\&LO::Debug::trace_mason_request2"
In LO::Debug:
-------------------------------
sub trace_mason_request2($;){
# Get any values passed in.
my($arg_comp) = @_;
# Take the component passed in, and add an <%init> block to the beginning of
it, that will print out the following
# component information: name
${$arg_comp} =
"<%init>\n" .
" use LO::Debug;\n" .
" LO::Debug::dd('DEBUG: Component Being Executed = '" .
'$m->current_comp()->name());' . "\n" .
"</%init>\n" .
${$arg_comp}; # Append the original component to this new <init>
block.
# Return success to the caller (even though return value is ignored by
HTML::Mason::Compiler).
return(1);
}# end trace_mason_request2
I don't get any errors with apache, it starts up fine. I've tested this
subroutine manually from the command prompt, and it works fine, it properly
prepends the <%init> block to a component. When I run apache, I get no such
output in the log. And yes, the logging function dd() works fine :-). Any
assistance you can offer would be greatly appreciated.
My environment:
HTML::Mason 1.32
CentOS 5
apache 1.3.37
Thanks,
- Jeff
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users