On Mon, Aug 27, 2007 at 05:38:26AM -0700, Jonathan Swartz wrote: > > On Aug 25, 2007, at 3:17 PM, Matt S Trout wrote: > > >On Fri, Aug 24, 2007 at 10:15:37PM +0100, Will Hawes wrote: > >>I've been trying unsuccessfully to disable all debug messages > >>while running > >>tests on my app with prove. Setting CATALYST_DEBUG=0 eliminates > >>all the test > >>server debug output such as the list of loaded actions, but i am > >>still > >>seeing the output of every call made to $c->log->debug by my > >>controller > >>code. > >> > >>As far as I can see the docs regarding CATALYST_DEBUG=0 don't make > >>any > >>distinction about where debug messages originate, only that they are > >>suppressed, which presumably means I shouldn't be seeing any debug > >>output at > >>all. > >> > >>Is my mistake in misunderstanding how $c->log->debug() is supposed > >>to work? > > > >Yes. > > > >That logs a message of level 'debug'. > > > >The internal Catalyst debugging aid stuff checks $c->debug and if > >so logs > >messages with the debug level. But that doesn't mean turning off > >the internal > >debugging changes the configuration of your logger whatsoever. > > > > But what's the point of using $c->debug to gate debug messages when > you could just check $log->is_debug? It is confusing to have some > debug log messages in the system gated on $c->debug, and others just > on $log->is_debug.
$c->debug is "turn on CATALYST INTERNALS DEBUG INFO". I can turn that off and still have debug-level messages from my application code passed by my logger. This is a feature. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director Want a managed development or deployment platform? Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/ _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/