Matt S Trout wrote: > Nate Wiger wrote: >> It looks like $c->log is always on in a given Catalyst plugin. I have >> simple, standard code like this: >> >> $c->log->debug("some message"); >> $c->log->debug(Dumper(\%hash)) if $c->log->is_debug; >> >> When I dump out the $c->log->is*, all of them return true (actually, >> 1/4/16 depending on the level, I assume this is a bitmask byproduct). >> >> Any ideas? Anyone else seen this? I even double-checked my classes to >> make sure they aren't overriding it... > > Log level config is separate from debug mode. > > __PACKAGE__->log(Catalyst::Log->new(@levels)); > > or > > $c->log->debug(...) if $c->debug; # this is what the Cat internals do
Ok, perhaps I'm a bit confused... reading the Catalyst::Log manpage, it seems I should just be able to write this: $c->log->whatever_level("message"); And it will/won't be shown depending on the runtime level config. Is that correct? -Nate _______________________________________________ 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/