develooper Front page | perl.perl6.language | Postings from June 2006

Classy logging for Classes

Thread Next
From:
Szilakszi Bálint
Date:
June 22, 2006 10:20
Subject:
Classy logging for Classes
Message ID:
449AD132.7010807@inf.elte.hu
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]

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About