You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by "Gonzalo A. Diethelm" <go...@aditiva.com> on 2002/05/08 17:49:55 UTC

LogKit and log4j

Hello, I'm just back from a long trip and trying to catch up with
past Avalon messages (430 queued up), specially on the Avalon+EJB
issue. I do have an unrelated question, though. I believe LogKit
is an effort to have a logging system as generic and configurable
as possible; I understand you can choose to use LogKit with log4j
as your "back-end" logging implementation. On the other hand,
log4j also provides an abstraction for logging that's supposed
to be very generic and configurable.

Question: which one should I use for a new project? Since log4j
provides (I believe, but I could be wrong) everything LogKit does,
and in addition it is a Jakarta project, is LogKit going the way
of the dodo? Is there any benefit in still using LogKit?

Thanks,


-- 
Gonzalo A. Diethelm
gonzalo.diethelm@aditiva.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Leo Simons <le...@apache.org>.
> > * Are there any BASIC components/abstractions in Avalon to deal
> >   with security? By that I mean authentication and authorization
> >   (as in role-based permission management).
> 
> Not at this stage. We have played with it before but as of now there is 
> nothing really there.

Nor does there really have to be as the std java APIs can do quite a
lot, and do it well. Just IMO.

- Leo



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Peter Donald <pe...@apache.org>.
On Fri, 10 May 2002 07:55, Gonzalo A. Diethelm wrote:
> A couple more questions:
>
> * Does LogKit by itself (i.e. not as Excalibur Logger) allow
>   for plugging log4j or JDK 1.4 logging as "back-end"?

Not really. You could bridge the two APIs (ie have Log4j/JDK Logging redirect 
to LogKit or vice versa) but theres little value in that. Instead I would 
recomend you use the avalon.framework.logger.* package which already 
abstracts those 3 APIs.

> * What is the appropriate BASIC component (analog to LogKit)
>   in Avalon to handle configuration information?

avalon.framework.configuration.*

> * Are there any BASIC components/abstractions in Avalon to deal
>   with security? By that I mean authentication and authorization
>   (as in role-based permission management).

Not at this stage. We have played with it before but as of now there is 
nothing really there.

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Peter Donald <pe...@apache.org>.
On Fri, 10 May 2002 22:41, Gonzalo A. Diethelm wrote:
> > > * Are there any BASIC components/abstractions in Avalon to deal
> > >   with security? By that I mean authentication and authorization
> > >   (as in role-based permission management).
...
> Would there be any value in creating one? A very generic interface-
> based security abstraction? 

Yes there is a bunch of interest :) Any serious application that needs to 
add/remove Users to the system and to manage roles etc needs something to get 
it going.

You may want to have a look at 

jakarta-avalon-cornerstone/src/java/org/apache/avalon/cornerstone/services/security/*

It has some interfaces to define RoleManagement and Authorization. It does not 
do any authentication management but it sorta assumed that JAAS would be used 
for that.

> Something along the lines of:

Looks interesting but I would be more likely to use a system that used the 
built in classes of JVM. ie User --> Principle, Action --> Permission.

>
> interface User {
>   User(String identity);
>   String getIdentity();
> }
>
> interface Credential {
>   Credential(String data);
>   String getData();
> }
>
> interface Authenticator {
>   boolean checkUserCredential(User user, Credential credential);
> }
>
> interface Action {}
>
> interface Authorizer {
>   boolean canUserDoThis(User user, Action action);
> }
>
> interface Session {
>   void setUser(User user);
>   User getUser();
>
>   void setAuthenticator(Authenticator authenticator);
>   Authenticator getAuthenticator();
>
>   void setAuthorizer(Authorizer);
>   Authorizer getAuthorizer();
>
>   void authenticateUser(Credential credential);
>   boolean isUserAuthenticated();
>
>   boolean canUserDoThis(User user, Action action);
> }

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: LogKit and log4j

Posted by "Gonzalo A. Diethelm" <go...@aditiva.com>.
> > * Does LogKit by itself (i.e. not as Excalibur Logger) allow
> >   for plugging log4j or JDK 1.4 logging as "back-end"?
> 
> Commons logging package and Framework's logging abstraction are
> designed for the basic issue of letting you choose which logging
> package you want later on.  I would suggest using either of those
> if what you want is a common API.

Ok, I think your (and others') answer clarifies what I was asking.
I will go with the Framework logging abstraction.

> > * Are there any BASIC components/abstractions in Avalon to deal
> >   with security? By that I mean authentication and authorization
> >   (as in role-based permission management).
> > 
> 
> Not at this time.  The Avalon team chose to follow Sun's lead on
> authentication and authorization, or to defer those concerns to the
> container.  There are projects that use JAAS, the Servlet's
> authorization/
> role management, or a proprietary authorization service.
> 
> The problem is that many applications have different needs.  Some
> servers do not need to worry about authenticating users (like HTTP
> proxy servers), and others work fine with the standard mechanisms.
> 
> The bottom line is none of us have gotten around to creating such
> an abstraction.

Would there be any value in creating one? A very generic interface-
based security abstraction? Something along the lines of:

interface User {
  User(String identity);
  String getIdentity();
}

interface Credential {
  Credential(String data);
  String getData();
}

interface Authenticator {
  boolean checkUserCredential(User user, Credential credential);
}

interface Action {}

interface Authorizer {
  boolean canUserDoThis(User user, Action action);
}

interface Session {
  void setUser(User user);
  User getUser();

  void setAuthenticator(Authenticator authenticator);
  Authenticator getAuthenticator();

  void setAuthorizer(Authorizer);
  Authorizer getAuthorizer();

  void authenticateUser(Credential credential);
  boolean isUserAuthenticated();

  boolean canUserDoThis(User user, Action action);
}



-- 
Gonzalo A. Diethelm
gonzalo.diethelm@aditiva.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: LogKit and log4j

Posted by Berin Loritsch <bl...@apache.org>.
> From: Gonzalo A. Diethelm [mailto:gonzalo.diethelm@aditiva.com] 
> 
> A couple more questions:
> 
> * Does LogKit by itself (i.e. not as Excalibur Logger) allow
>   for plugging log4j or JDK 1.4 logging as "back-end"?

I think you mean Framework logger.  The Excalibur package has to
do with configuring the Logger.

LogKit has a pluggable output system.  You could write an output
that forwards the events to Log4J or JDK 1.4--but why would you
want to when you are using a fully functional logging package
already.

Commons logging package and Framework's logging abstraction are
designed for the basic issue of letting you choose which logging
package you want later on.  I would suggest using either of those
if what you want is a common API.

> 
> * What is the appropriate BASIC component (analog to LogKit)
>   in Avalon to handle configuration information?

We have two choices.  Framework has a configuration package and
a parameters package.  Each represent a different type of information.
The parameters package is used for very simple flat configuration
information.  It is similar to the Properties class in the JDK,
except it provides typesafe accessor methods (i.e. getParameterAsLong)
and can extract Parameters from the configuration object.  The
configuration package has a Configuration object that represents
a hierarchical configuration.

Included are utilities to create the Configuration object from XML
files, and to serialize them back to XML.

> 
> * Are there any BASIC components/abstractions in Avalon to deal
>   with security? By that I mean authentication and authorization
>   (as in role-based permission management).
> 

Not at this time.  The Avalon team chose to follow Sun's lead on
authentication and authorization, or to defer those concerns to the
container.  There are projects that use JAAS, the Servlet's
authorization/
role management, or a proprietary authorization service.

The problem is that many applications have different needs.  Some
servers do not need to worry about authenticating users (like HTTP
proxy servers), and others work fine with the standard mechanisms.

The bottom line is none of us have gotten around to creating such
an abstraction.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: LogKit and log4j

Posted by "Gonzalo A. Diethelm" <go...@aditiva.com>.
A couple more questions:

* Does LogKit by itself (i.e. not as Excalibur Logger) allow
  for plugging log4j or JDK 1.4 logging as "back-end"?

* What is the appropriate BASIC component (analog to LogKit)
  in Avalon to handle configuration information?

* Are there any BASIC components/abstractions in Avalon to deal
  with security? By that I mean authentication and authorization
  (as in role-based permission management).

Thanks,


-- 
Gonzalo A. Diethelm
gonzalo.diethelm@aditiva.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Stephen McConnell <mc...@osm.net>.
If you planning on using the Avalon Framework  then you have to handle 
LogEnabled - at that point you need to decide what your logging 
implementation will be - but that an implemetation question than will be 
impacted by other products your using, and the security considerations 
your subject to, and consideration with respect to integration with 
products that will use your product. In our case, security is an 
overriding factor which results in a strong preference for using the 
LogKit implementation over and above other available logging packages.

Cheers, Steve.


Gonzalo A. Diethelm wrote:

>Thanks for the quick responses. I did not intend by any means
>to (re)start a flame fest, nor did I try to imply LogKit is
>better/worse than log4j. I will research some more and decide
>what to use. Thanks,
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: LogKit and log4j

Posted by "Gonzalo A. Diethelm" <go...@aditiva.com>.
Thanks for the quick responses. I did not intend by any means
to (re)start a flame fest, nor did I try to imply LogKit is
better/worse than log4j. I will research some more and decide
what to use. Thanks,


-- 
Gonzalo A. Diethelm
gonzalo.diethelm@aditiva.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Leo Simons <ma...@leosimons.com>.
I recommend you try and find your answer in the archives as this has
been a hot issue full of flames in the past. I'd rather not have it
again.

You can use the JDK 1.4 Logging API, Logkit or Log4j. You can use
commons-logging to make them pluggable. We also have something similar
in avalon.

Each one of these has some advantages and disadvantages. I recommend you
use the one that is used in the products you are using to build your app
(ie if you use avalon, use logkit).

One small thing tho: logkit is also a jakarta project =)

cheers,

- Leo

On Wed, 2002-05-08 at 17:49, Gonzalo A. Diethelm wrote:
> Hello, I'm just back from a long trip and trying to catch up with
> past Avalon messages (430 queued up), specially on the Avalon+EJB
> issue. I do have an unrelated question, though. I believe LogKit
> is an effort to have a logging system as generic and configurable
> as possible; I understand you can choose to use LogKit with log4j
> as your "back-end" logging implementation. On the other hand,
> log4j also provides an abstraction for logging that's supposed
> to be very generic and configurable.
> 
> Question: which one should I use for a new project? Since log4j
> provides (I believe, but I could be wrong) everything LogKit does,
> and in addition it is a Jakarta project, is LogKit going the way
> of the dodo? Is there any benefit in still using LogKit?
> 
> Thanks,
> 
> 
> -- 
> Gonzalo A. Diethelm
> gonzalo.diethelm@aditiva.com
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: LogKit and log4j

Posted by Paul Hammant <Pa...@yahoo.com>.
Gonzalo ,

We like LogKit of course and have no intention of letting it go the way 
of the dodo.  It is better that alternatives, but we are tired of the 
fight. ->

   http://www.google.com/search?hl=en&q=logkit+better+log4j

-ph

>Hello, I'm just back from a long trip and trying to catch up with
>past Avalon messages (430 queued up), specially on the Avalon+EJB
>issue. I do have an unrelated question, though. I believe LogKit
>is an effort to have a logging system as generic and configurable
>as possible; I understand you can choose to use LogKit with log4j
>as your "back-end" logging implementation. On the other hand,
>log4j also provides an abstraction for logging that's supposed
>to be very generic and configurable.
>
>Question: which one should I use for a new project? Since log4j
>provides (I believe, but I could be wrong) everything LogKit does,
>and in addition it is a Jakarta project, is LogKit going the way
>of the dodo? Is there any benefit in still using LogKit?
>
>Thanks,
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>