You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@empire-db.apache.org by Francis De Brabandere <fr...@gmail.com> on 2009/03/01 23:32:34 UTC

non-private loggers?

Why are some loggers protected instead of private?

-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Re: non-private loggers?

Posted by Francis De Brabandere <fr...@gmail.com>.
I want to see the class where the logging came from in the logs,
that's why I always declare a logger per class. And you can always
make them protected later on when needed (not that I ever felt the
need)

On Mon, Mar 2, 2009 at 12:47 AM, Rainer Döbele <do...@esteam.de> wrote:
> Hi Francis,
>
> counter question: Why not?
>
> Private loggers give you more control over log the log configuration.
>
> Protected loggers are for lazy people, who don't want to declare a logger in every derived class.
> If you know for sure that you're not going to need a private logger in every derived class, why not make it protected in the base class?
>
> So it's a matter of taste - I personally decide from case to case.
>
> Regards
> Rainer
>
>
> Francis De Brabandere wrote:
>> re: non-private loggers?
>>
>> Why are some loggers protected instead of private?
>>
>> --
>> http://www.somatik.be
>> Microsoft gives you windows, Linux gives you the whole house.
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

AW: non-private loggers?

Posted by Rainer Döbele <do...@esteam.de>.
Hi Francis,

counter question: Why not?

Private loggers give you more control over log the log configuration.

Protected loggers are for lazy people, who don't want to declare a logger in every derived class.
If you know for sure that you're not going to need a private logger in every derived class, why not make it protected in the base class?

So it's a matter of taste - I personally decide from case to case.

Regards
Rainer


Francis De Brabandere wrote:
> re: non-private loggers?
> 
> Why are some loggers protected instead of private?
> 
> --
> http://www.somatik.be
> Microsoft gives you windows, Linux gives you the whole house.