You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jeff Nichols <je...@weblicon.net> on 2002/11/01 17:58:34 UTC

Custom property configuration for Logger wrapper

Hi,

I'm making a wrapper for the Logger class that will have some additional
methods defined.  I would like the configuration for these methods to be
editable through the log4j.properties file.

The wrapper would be something like this:

public class MyLogger {
    private Logger logger;

    [standard log4j type methods using logger]

    public void message(String sessionId, byte[] message) {
        ...
    }

}

And the properties file would be something like this:

[standard log4j.properties entries]

my.package.MyLogger.messages=true

Is this possible or should I try a different strategy??
Thanks for your time,

Jeff



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002


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


Re: Custom property configuration for Logger wrapper (Again)

Posted by Ceki Gülcü <ce...@qos.ch>.
Jeff,

Interesting question but I am afraid for the moment you will have to roll 
your own Configurator implementation. The next version of log4j *may* allow 
for the use to define her own processing rules.

At 17:47 06.11.2002 +0100, you wrote:
>Thought I'd give this one more try.. sorry about the bump, but I've been
>looking around and still can't find any solutions.  Thanks for any help you
>can give.
>
>Jeff
>
>----- Original Message -----
>From: "Jeff Nichols" <je...@weblicon.net>
>To: "log4j-user" <lo...@jakarta.apache.org>
>Sent: Friday, November 01, 2002 5:58 PM
>Subject: Custom property configuration for Logger wrapper
>
>
> > Hi,
> >
> > I'm making a wrapper for the Logger class that will have some additional
> > methods defined.  I would like the configuration for these methods to be
> > editable through the log4j.properties file.
> >
> > The wrapper would be something like this:
> >
> > public class MyLogger {
> >     private Logger logger;
> >
> >     [standard log4j type methods using logger]
> >
> >     public void message(String sessionId, byte[] message) {
> >         ...
> >     }
> >
> > }
> >
> > And the properties file would be something like this:
> >
> > [standard log4j.properties entries]
> >
> > my.package.MyLogger.messages=true
> >
> > Is this possible or should I try a different strategy??
> > Thanks for your time,
> >
> > Jeff
> >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
> >
> >
> > --
> > To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
> > For additional commands, e-mail:
><ma...@jakarta.apache.org>
> >
> >
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.408 / Virus Database: 230 - Release Date: 10/25/2002
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



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


Custom property configuration for Logger wrapper (Again)

Posted by Jeff Nichols <je...@weblicon.net>.
Thought I'd give this one more try.. sorry about the bump, but I've been
looking around and still can't find any solutions.  Thanks for any help you
can give.

Jeff

----- Original Message -----
From: "Jeff Nichols" <je...@weblicon.net>
To: "log4j-user" <lo...@jakarta.apache.org>
Sent: Friday, November 01, 2002 5:58 PM
Subject: Custom property configuration for Logger wrapper


> Hi,
>
> I'm making a wrapper for the Logger class that will have some additional
> methods defined.  I would like the configuration for these methods to be
> editable through the log4j.properties file.
>
> The wrapper would be something like this:
>
> public class MyLogger {
>     private Logger logger;
>
>     [standard log4j type methods using logger]
>
>     public void message(String sessionId, byte[] message) {
>         ...
>     }
>
> }
>
> And the properties file would be something like this:
>
> [standard log4j.properties entries]
>
> my.package.MyLogger.messages=true
>
> Is this possible or should I try a different strategy??
> Thanks for your time,
>
> Jeff
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/25/2002


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