I'm trying to collect ideas about how could be (optionally available)
logging added/implemented for classes, as in logging what methods are
called at runtime, the parameters they are called with, etc. without
embedding the whole logic in the methods themselves on a one-by-one basis.
What I'm specifically looking for would be an instance based idea, so it
doesn't permanently overwrite the class and thus consequently switch
logging on everywhere that class is used, only for the scope of a given
instance of the class.
This separation/factoring out logging from a class would provide more
elegant and cleaner code, for example by not requiring a method
dispatcher capable of logging. The question is, how can it be done?
Please share your thoughts and ideas on this issue.
Thank you in advance,
Balint Szilakszi [english spelling]
Szilakszi Bálint [hungarian spelling]