You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2002/10/01 14:25:59 UTC

RE: Mailet Logging ==> Jakarta Commons (org.apache.commons.logging)


> > What are your personal thoughts regarding adopting the Jakarta Commons
> > Logging API?  That is what other Apache projects seem to be doing as the
> > common denominator; it is, actually, its raisan d'etre.  It works with
> > Log4J, JDK 1.4, Avalon LogKit, and can be hosted on any other logging
> > implementation.

> My opinion is sill the same, I don't believe that offering logging as part
> of the API is a good idea because:

> IMHO it violates the seperation of concerns between mail processing, our
> concern, and logging, not our concern.

Almost no application's primary concern is logging.  James has exactly the
same concern with logging that other server applications, such as Apache and
Tomcat, have: the need to record information about the application's
operation.  Providing an API is not the same as providing a mechanism.
Adopting the Jakarta Commons Logging API would be one way to provide a
standard contract without specifying the runtime mechanism.  But log(String)
and log(String, Exception) are insufficient.

> Anyone wanting enhanced logging capabilities can use any logging API they
> choose within their mailets.

IMHO, this is chaotic and would make it almost impossible to follow the
pipeline.  Administrators don't need 101 mailet logs running around like
firehouse puppies.  We need a controllable and coordinated log of
information.

	--- Noel


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


Re: Mailet Logging ==> Jakarta Commons (org.apache.commons.logging)

Posted by Stephen McConnell <mc...@apache.org>.

Danny Angus wrote:

>>Almost no application's primary concern is logging.  James has exactly the
>>same concern with logging that other server applications, such as
>>Apache and
>>Tomcat, have: the need to record information about the application's
>>operation.  Providing an API is not the same as providing a mechanism.
>>Adopting the Jakarta Commons Logging API would be one way to provide a
>>standard contract without specifying the runtime mechanism.  But
>>log(String)
>>and log(String, Exception) are insufficient.
>>    
>>
>
>And yet Tomcat and the servlet API you quote provide only for log(String)
>leaving any more sophisticated logging requirement to the discretion of
>servlet writers.
>

... and massive headaches for developers attempting to unify things. Leaving
this sort of thing to the discretion of the servlet writers is just plain
bad.  I've has spent way to much time wrapping and working around logging
systems because of APIs that havn't considered that tools are deployed 
in an
environment where the developer is out of the picture. Logging is more
related to management policies that anything from a developer.

Cheers, Steve.



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

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




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


RE: Mailet Logging ==> Jakarta Commons (org.apache.commons.logging)

Posted by "Noel J. Bergman" <no...@devtech.com>.
[This message merges to threads on logging]

> Tomcat and the servlet API you quote provide only for log(String)
> leaving any more sophisticated logging requirement to the discretion
> of servlet writers.

> As far as I'm concerned the logging of mailets should be an issue for
mailet
> developers, developers are free to use commons logging or anything else in
> their mailets, as is the case in the servlet API.

Oh, I get it!  Good idea.  We'll treat Mailets just like Servlets.

The Servlet API is part of J2EE.  The initial lack of standardized logging
resulted in unmanagable systems (first because of no logging APIS, then
because of too many logging APIs desparately trying to fix that problem),
but the Servlet API didn't need to be enhanced to fix things because it
isn't standalone -- it lives in the context of Java Logging, which is a
mandatory part of J2SE (java.util.logging, not javax.util.logging).  I have
been saying the same thing: the Mailet API doesn't need new methods, but the
mailet environment should include a common logging interface.  I had
suggested using Jakarta Commons, since James is a Jakarta project, and the
Jakarta Commons logging API is neutral, but your idea works fine.  Servlet
authors and administrators can count on Java Logging, which is (after all) a
de jure Java Standard, and you are saying that Mailets should be the same as
Servlets.

Good idea, Danny!  Because we all know that if we just tell every mailet
author to pick (or roll) their own mechanism, it leads to the kind of
unmanagable chaos that people are trying to clean up, so we certainly don't
mean to encourage that!  Your idea to use Java Logging takes care of that
problem.  Mailet authors can count on the presence of Java Logging, just
like Servlet authors, and James administrators get the control and
information that they need.

Ok, this could work.  We ignore the global configuration file, and have
James configure a default mailet logger from information in Jame's own
configuration files.  We can make a shared logger object available through
the MailetContext.  A mailet that supports the use of its own logger can be
configured through its <mailet> tag, which is probably not a good idea, but
at least provides the James admin with a common point of control.

If we want (perhaps for people porting code into a mailet), we could support
optional logging APIs by layering a Jakarta Commons logger or Avalon
Frameworks logger on Java Logging, but the standard interface will be Java
Logging.

This won't force people to upgrade to Java 1.4 in order to use James.  We
can use lumberjack (http://javalogging.sourceforge.net/) for Java 1.2+
environments.

	--- Noel


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


RE: Mailet Logging ==> Jakarta Commons (org.apache.commons.logging)

Posted by Danny Angus <da...@apache.org>.
> Almost no application's primary concern is logging.  James has exactly the
> same concern with logging that other server applications, such as
> Apache and
> Tomcat, have: the need to record information about the application's
> operation.  Providing an API is not the same as providing a mechanism.
> Adopting the Jakarta Commons Logging API would be one way to provide a
> standard contract without specifying the runtime mechanism.  But
> log(String)
> and log(String, Exception) are insufficient.

And yet Tomcat and the servlet API you quote provide only for log(String)
leaving any more sophisticated logging requirement to the discretion of
servlet writers.

d.





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