in reply to Re^2: Best way to share logging object among multiple objects?
in thread Best way to share logging object among multiple objects?

Taking my advice with a chunk or rock salt the size of your head because I (at this late date) have still not learned Moose: I'd say yes, that's probably the simplest. If you use (say) Log::Log4perl, I think that the singleton issue's already taken care of, and all you need at that point is a role that provides the logging features of your choice. Having the role lets you (if you want to) abstract the logging so that you can say "please log this object" to the CanLog role, and the role takes care of the details (e.g., does this object have a detailed_description method I can call, or do I just Data::Dumper it?).
  • Comment on Re^3: Best way to share logging object among multiple objects?