You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Oleg V Alexeev <go...@penza.net> on 2001/11/21 17:50:34 UTC
About Log4j using
Hello Struts,
Now I try to make Jakarta-Log4j based Log4jService - service for
ServiceManager - to make this service available for all Struts
environment for common logging mechanism. But great part of Log4j is
based on static methods and vars...
My main idea is to write some kind of Adapter for various logging
implementations - LogService. ServiceManager, ActionServlet and
Action classes can use it to perform logging operations. Default
implementation for LogService is Log4jService - ServiceManager
instantiates it at init moment, if no one logger class is specified
in config. By this scheme end developer can write his own LogService
implementation (for example, JSR47 specification based) and all
stuff will use it as standart logger.
So logger instance must hide all details from Action classes.
Concrete logger must work with some object to perform logging
operations - create at init moment, configure it and use as internal
resource. Static methods and vars in Log4j is not so good for such
model....
Can anybody suppose any idea about logging mechanism or about some
logging implementation without static stuff?
--
Best regards,
Oleg mailto:gonza@penza.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re[2]: About Log4j using
Posted by Oleg V Alexeev <go...@penza.net>.
Hello Incze,
Thursday, November 22, 2001, 12:23:34 AM, you wrote:
>> Can anybody suppose any idea about logging mechanism or about some
>> logging implementation without static stuff?
>>
>> --
>> Best regards,
>> Oleg mailto:gonza@penza.net
IL> I'm not sure that with or without statics but some generic logger interface
IL> work has started in the commons project. It's in a very early state and
IL> gives you a generic Log interface and a LogSource factory which defaults
IL> to log4j if available or to a NoOpLog logger if not. I think the plan was
IL> to adapt this intterface to avalon's logkit and jdk1.4's log package, too.
Thank you - good news...
--
Best regards,
Oleg mailto:gonza@penza.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: About Log4j using
Posted by Incze Lajos <in...@mail.matav.hu>.
> Can anybody suppose any idea about logging mechanism or about some
> logging implementation without static stuff?
>
> --
> Best regards,
> Oleg mailto:gonza@penza.net
I'm not sure that with or without statics but some generic logger interface
work has started in the commons project. It's in a very early state and
gives you a generic Log interface and a LogSource factory which defaults
to log4j if available or to a NoOpLog logger if not. I think the plan was
to adapt this intterface to avalon's logkit and jdk1.4's log package, too.
incze
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>