[Catalyst] Found a simple way to restrain the verbosity of C::C::FormBuilder under debug

Joe Landman landman at scalableinformatics.com
Mon Jan 14 16:29:49 GMT 2008


Ok, this has been bugging me for a while.  When you turn on app 
debugging, C::C::FormBuilder goes nuclear on your logs.  You have a 
small percentage of your log being your application, and most of your 
log being the  C::C::FormBuilder being its internal machinations ... 
which, I really, really don't need to see.

So, how do you turn off (or control) the C::C::FormBuilder logs?  Kinda 
simple really.

When you create your form:

	use base 'Catalyst::Controller::FormBuilder';
	sub clone : Local Form {
     	  my ($self, $c) = @_;
    	  ....
    	  my $form = $self->formbuilder->new(debug=>0);

and ... no more megatons of C::C::FormBuilder internal discussions in 
your logs.

Now it is calm, controlled, showing the entry into C::C::FormBuilder and 
the exit of C::C::FormBuilder ...

Thought everyone would like to know.



-- 
Joe Landman
landman at scalableinformatics.com



More information about the Catalyst mailing list