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 Joseph Sartre <jo...@msn.com> on 2005/06/22 09:05:44 UTC

Creating custom levels

Does anyone know if we can create custom levels in log4j.
If it is possible, how do we create them?
Thanks a lot

Joseph


-----------
Alternative email: js397@st-andrews.ac.uk
Personal Website: http://www.yussef.no-ip.com
Mobile UK: +447704456081
Mobile FR: +33665668941



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Creating custom levels

Posted by Carol Enderlin <ca...@gmail.com>.
Look for XLevel.java in log4j distribution directory like :

logging-log4j-1.2.9\examples\customLevel

Then the trick to using it is to specify the level with the name of
the level plus # plus fully qualified classname like:

log4j.rootLogger=TRACE#customlevel.XLevel, STDOUT

On 6/23/05, Joseph Sartre <jo...@msn.com> wrote:
> I really can't find anything really clear enough. Anybody have any
> suggestions about where I can find something or how i could create this
> custom level which would be configurable from an xml config file?
> 
> Thanks very much
> 
> Joseph
> 
> -----------
> Alternative email: js397@st-andrews.ac.uk
> Personal Website: http://www.yussef.no-ip.com
> Mobile UK: +447704456081
> Mobile FR: +33665668941
> 
> 
> 
> >From: James Stauffer <st...@gmail.com>
> >Reply-To: James Stauffer <st...@gmail.com>
> >To: Log4J Users List <lo...@logging.apache.org>
> >Subject: Re: Creating custom levels
> >Date: Wed, 22 Jun 2005 09:24:05 -0500
> >
> >Yes it is possible, but I don't see the info after a quick search.
> >Many people add a trace level so search on that may help.
> >
> >On 6/22/05, Joseph Sartre <jo...@msn.com> wrote:
> > > Does anyone know if we can create custom levels in log4j.
> > > If it is possible, how do we create them?
> > > Thanks a lot
> > >
> > > Joseph
> > >
> > >
> > > -----------
> > > Alternative email: js397@st-andrews.ac.uk
> > > Personal Website: http://www.yussef.no-ip.com
> > > Mobile UK: +447704456081
> > > Mobile FR: +33665668941
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mai

l: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
> >--
> >James Stauffer
> >Are you good? Take the test at http://www.livingwaters.com/good/
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Creating custom levels

Posted by James Stauffer <st...@gmail.com>.
I can't find it off hand either but it involves extending the level class.

On 6/23/05, Joseph Sartre <jo...@msn.com> wrote:
> I really can't find anything really clear enough. Anybody have any
> suggestions about where I can find something or how i could create this
> custom level which would be configurable from an xml config file?
> 
> Thanks very much
> 
> Joseph
> 
> -----------
> Alternative email: js397@st-andrews.ac.uk
> Personal Website: http://www.yussef.no-ip.com
> Mobile UK: +447704456081
> Mobile FR: +33665668941
> 
> 
> 
> >From: James Stauffer <st...@gmail.com>
> >Reply-To: James Stauffer <st...@gmail.com>
> >To: Log4J Users List <lo...@logging.apache.org>
> >Subject: Re: Creating custom levels
> >Date: Wed, 22 Jun 2005 09:24:05 -0500
> >
> >Yes it is possible, but I don't see the info after a quick search.
> >Many people add a trace level so search on that may help.
> >
> >On 6/22/05, Joseph Sartre <jo...@msn.com> wrote:
> > > Does anyone know if we can create custom levels in log4j.
> > > If it is possible, how do we create them?
> > > Thanks a lot
> > >
> > > Joseph
> > >
> > >
> > > -----------
> > > Alternative email: js397@st-andrews.ac.uk
> > > Personal Website: http://www.yussef.no-ip.com
> > > Mobile UK: +447704456081
> > > Mobile FR: +33665668941
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
> >--
> >James Stauffer
> >Are you good? Take the test at http://www.livingwaters.com/good/
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Creating custom levels

Posted by Joseph Sartre <jo...@msn.com>.
I really can't find anything really clear enough. Anybody have any 
suggestions about where I can find something or how i could create this 
custom level which would be configurable from an xml config file?

Thanks very much

Joseph

-----------
Alternative email: js397@st-andrews.ac.uk
Personal Website: http://www.yussef.no-ip.com
Mobile UK: +447704456081
Mobile FR: +33665668941



>From: James Stauffer <st...@gmail.com>
>Reply-To: James Stauffer <st...@gmail.com>
>To: Log4J Users List <lo...@logging.apache.org>
>Subject: Re: Creating custom levels
>Date: Wed, 22 Jun 2005 09:24:05 -0500
>
>Yes it is possible, but I don't see the info after a quick search.
>Many people add a trace level so search on that may help.
>
>On 6/22/05, Joseph Sartre <jo...@msn.com> wrote:
> > Does anyone know if we can create custom levels in log4j.
> > If it is possible, how do we create them?
> > Thanks a lot
> >
> > Joseph
> >
> >
> > -----------
> > Alternative email: js397@st-andrews.ac.uk
> > Personal Website: http://www.yussef.no-ip.com
> > Mobile UK: +447704456081
> > Mobile FR: +33665668941
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
>--
>James Stauffer
>Are you good? Take the test at http://www.livingwaters.com/good/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Creating custom levels

Posted by James Stauffer <st...@gmail.com>.
Yes it is possible, but I don't see the info after a quick search. 
Many people add a trace level so search on that may help.

On 6/22/05, Joseph Sartre <jo...@msn.com> wrote:
> Does anyone know if we can create custom levels in log4j.
> If it is possible, how do we create them?
> Thanks a lot
> 
> Joseph
> 
> 
> -----------
> Alternative email: js397@st-andrews.ac.uk
> Personal Website: http://www.yussef.no-ip.com
> Mobile UK: +447704456081
> Mobile FR: +33665668941
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org