[Catalyst] C::C::FormBuilder debug noise...
Marcello Romani
mromani at ottotecnica.com
Fri May 4 07:20:09 GMT 2007
RA Jones ha scritto:
> Marcello Romani wrote:
>> Hi all,
>> I have a problem with Catalyst::Controller::FormBuilder.
>> It prints way too much debug information, filling up my consolle's
>> screen buffer :-)
>>
>> If I turn off Catalyst debgging by omitting the -Debug option the
>> debug messages disappear, but so do the Catalyst ones, which I instead
>> want to keep.
>>
>> CGI::FormBuilder docs say it has four debug levels (0,1,2,3), C::P::FB
>> says it sets the debug parameter to match Catalyst's debug setting.
>>
>> I have tried various methods to set debug=0 in FB, but to no avail:
>>
>> MyApp->config->{'Controller::FormBuilder'}->{debug}=0;
>>
>> but then looking at the C::C::FormBuilder code I didn't see any
>> reference to the debug flag.
>> I also tried to modify the code, adding a debug => 0 line in
>> $self->_fb_setup, but it didn't nothing. I'm not sure I fully
>> understand how that code works anyway :-)
>>
>> I even tried to call ->debug as a class method on CGI::FB.
>>
>> It would be nice to set CGI::FB debug level independently of the Cat one.
>>
>> Anyone has ideas ?
>
> Set debug level in your CCF config settings:
>
> __PACKAGE__->config(
> 'Controller::FormBuilder' => {
> new => {
> debug => 0, # or 1, 2, etc
> # other settings eg stash_name
> }
> );
>
> Setting debug to zero still generates some useful error messages. Works
> for me!
Hmm, I tried your code (which afaikt should work) but putting 0,1 or 2
doesn't make any difference in the type or amount of debug messages the
app is emitting.
I'll double check my code and report. Thanks for now.
--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com
More information about the Catalyst
mailing list