Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Riena logging reminder...

Hi Elias,

Good reminder!
Do you think we should deprecate (or remove) the possibility of (b)?

Tschüß,
Stefan

Elias Volanakis wrote:
Please remember to use this style when logging:

(a) private static final Logger LOGGER =
Log4r.getLogger(Activator.getDefault(), Foo.class);

instead of:

(b) private static Logger LOGGER = Activator.getDefault().getLogger(Foo.class);

The advantage is that Stefan's Log4r also works when not running as a
bundle. The second style will fail with a NPE because
Activator.getDefault() will be null in that case.

:-)

Greetings from Portland,
Elias.




Back to the top