
11 Feb
2009
11 Feb
'09
5:32 a.m.
I honestly think that having "loggers as class members" is a bad idea.
why do you think that?
Because in my book a class represents a certain domain-specific abstraction and encapsulates the data and behavior relevant to that abstraction. A logger does not fit that description for me. Come to think of it, I never actually had even such a need. As I indicated my usage pattern is to retrieve a logger by its name (well, a handle to it) when its needed (on the file level or the function level). Once retrieved, I keep that reference around (again, on the file level or the function level) for efficiency purposes. I understand Andrey's library provides that kind of behavior. V.