Hi,

1. This solution still stores all log data into one file. Can "per mailet"
logger configuratuon be implemented?
2. Why GenericMailet can not simply extend AbstractLogEnabled and there will
be setLogger(...) for every mailet, say in MailetLoader? (what is actually
proposed in the end of your letter).

Andrei

----- Original Message -----
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
To: "James-Dev Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 10:11 PM
Subject: [Mailet API] Logging Proposal


> [Needless to say, these definitions include only the logging related
> portion]
>
> interface MailetContext
> {
>    org.apache.avalon.framework.logger.Logger getLogger();
>
>    void log(String message);              // deprecated
>    void log(String message, Throwable t); // deprecated
> }
>
> abstract class GenericMailet implements Mailet, MailetConfig
> {
>    void log(String message);              // deprecated
>    void log(String message, Throwable t); // deprecated
>
>    /*
> allows getLogger()."cat"(msg[, t]) instead of
>       getMailetContext().getLogger()."cat"(message[, t]);
>
>       implementation may wrap the logger to include
>       config.getMailetName() + ": " in the message
>
>     */
>    org.apache.avalon.framework.logger.Logger getLogger();
> }
>
> Alternative would be to break with the Mailet v1 API entirely, and go
with:
>
>    interface Mailet extends org.apache.avalon.framework.logger.LogEnabled
>
> but I'm less inclined in that direction.
>
> Please comment with specific changes (or even rewrites), so we can keep
the
> discussion concrete.
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to