Moose-people,

I have a large system built with Moose objects and roles that is logged with
Log::Log4perl.  Moose meets my needs well, and the functionality of
MooseX::Traits helps a great deal in making the system configurable.

My only quibble is that MooseX::Traits creates an anonymous class as a
subclass with the desired roles "baked in."  This is great, except when
using Log::Log4perl.

Log::Log4perl encourages you to maintain a hierarchy of loggers that matches
your class hierarchy.  I was achieving this by doing:
Log::Log4perl->get_logger(shift->meta->name).  This works great except with
anonymous classes since I can't turn on logging in a particular class unless
I know what the class name will be ahead of time.

Has anyone solved this problem?

Dan

Reply via email to