Using Nucleus logging for non-GenericService
objects can present two relatively common problems:
Your Nucleus-instantiated component cannot extend
GenericService
You use classes that are not created by Nucleus, but for which you want to do Nucleus-style logging
The LoggingPropertied
interface and the ClassLoggingFactory
can be used to solve these problems.
Note: You should use GenericService
Nucleus components as much as possible, because that interface is simple to use and well supported. If you cannot use GenericService
components, use a Nucleus-instantiated component that implements the LoggingPropertied
interface. This retains the power and flexibility of a Nucleus configured component, even if your base class did not implement ApplicationLogging
. Use the ClassLoggingFactory
if neither of these approaches is possible.