[Catalyst] Logging and other stuff in a Model Class
alejandro.imass at gmail.com
Tue Dec 28 22:01:28 GMT 2010
>From all I have read it's considered a best practice to avoid passing
$c to your models and create your model in ways that it can be
independently used (and tested) from Catalyst. That is, create model
classes that are independent from Catalyst and then create a thin glue
layer using Class::Model:;Adaptor or any of it's derivatives like
Factory or InstancePerContext.
So if I want to log something in my independent model class and
connect that logging to the catalyst logger using something like
C:M:Adaptor how would one go about doing that? The idea would be for
the independent class to use similar logging semantics (debug, info,
warn, error, fatal).
More information about the Catalyst