On Nov 6, 2007, at 6:59 PM, Joe Landman wrote:
How do I selectively enable or disable debugging output?
Specifically, FormBuilder debugging output is simply far to verbose
to be meaningful to us. I suppose I could simply pass in a debug=>0
when I create the form. Is there any global way?
FWIW: I only want to surpress formbuilder output during debug.
Log4perl and Catalyst::Log::Log4perl make this trivial, here is a bit
of the configuration from my log4perl.conf...
# Set the default to get everything at level DEBUG or above, and
output to the appender named Screen
log4perl.logger=DEBUG,Screen
# For Catalyst::Plugin::Authorization and subclasses, only log at
level ERROR or above
log4perl.logger.Catalyst.Plugin.Authorization=ERROR,Screen
# Same for Catalyst::Plugin::Session
log4perl.logger.Catalyst.Plugin.Session=ERROR,Screen
# Define a logger called Screen that logs to stderr, and that color
codes the output by level
log4perl.appender.Screen=Log::Log4perl::Appender::ScreenColoredLevels
log4perl.appender.Screen.stderr=1
log4perl.appender.Screen.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern=%p[%c] %m%n
--
Jason Kohles, RHCA RHCDS RHCE
[EMAIL PROTECTED] - http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/