2016-04-28 10:20 GMT+02:00 Nicolai Hess <[email protected]>: > What I am talking about is that I don't want create MySpecialLog for any >> MySpecialDomainObject which I want to log. >> > > Traits? > > Put you logging api in a Trait instead of Object and let your > MySpecialDomainObject use this trait ? >
Really? Try remember usual workflow when we investigate some problems with code when we can't use debugger. We put kind of "Transcript show:" in multiple places to see state of our objects at concrete point of time. With object logging we will log our objects directly without converting to strings. Do you want to stop your "debugging workflow" every time you need to log objects which not support it? (to add special trait). But anyway with Trait you can't add timestamp to your domain object which is always required for logs (I think we all agree about timestamp).
