You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jim Alateras <ji...@intalio.com> on 2002/04/18 06:25:37 UTC
Problem using AbstractLogEnabled
I have a class that extends AbstractLogEnabled
public class ActionRunner
extends AbstractLogEnabled
implements Runnable {
}
bur when I attempt to use getLogger() it always returns an NPE. Is there any
initialization that is required before I can use the logger feature.
cheers
</jima>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Problem using AbstractLogEnabled
Posted by Jeremias Maerki <je...@outline.ch>.
Yes, that's by design. The container is responsible for setting the
logger on its child as the first thing after instantiation by calling
enableLogging(Logger logger). See "Developing with Avalon" for the
complete lifecycle. Other keywords: Inversion of Control.
> I have a class that extends AbstractLogEnabled
>
> public class ActionRunner
> extends AbstractLogEnabled
> implements Runnable {
> }
>
>
> bur when I attempt to use getLogger() it always returns an NPE. Is there any
> initialization that is required before I can use the logger feature.
Cheers,
Jeremias Märki
mailto:jeremias.maerki@outline.ch
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>