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 Asaf Lahav <as...@primagrid.com> on 2006/03/15 16:34:51 UTC

Trace level in log4j

Hi,

I have been going through the log4j documentation and couldn't find what I'm
looking for. so I decided to ask here before I conclude my search.

What I am trying to achieve is the ability to define a log4j trace level.

 

A trace level is a number which indicates the level (importance) of an
audited message.

 

What I would like log4j to do for me, is to actually audit messages that
their trace level is higher then a level I will set in the log4j
configuration file.

 

I hope what I wrote makes sense :-)

Any help would be appreciated.

Thanks in advance,

 

Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254



 


RE: Trace level in log4j

Posted by Asaf Lahav <as...@primagrid.com>.
Thanks for the info Javier.


Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254

 


-----Original Message-----
From: Javier Gonzalez [mailto:jagonzal@gmail.com] 
Sent: Wednesday, March 15, 2006 6:55 PM
To: Log4J Users List
Subject: Re: Trace level in log4j

Ok... so you want to implement a "parallel" level hierachy, so that every
log event has a standard log4j level and your added "trace" level?

If that is the case, I think you might be on your own. You want to meddle
deep into the innards of log4j (if I read you correctly, you'll need to
modify Logger, the Appenders you wish to use, possibly Layout, too). Maybe
you could put your trace level in the message text, and set filters on the
appenders?

(Besides, I still don't see how the existing levels fail to do what you want
to achieve - I mean, you could be get, say, DEBUG level messages with high
"trace" level. Does that make sense?)

On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
>
> I am not trying to implement a new log level.
> I would like to specify a trace level, which is an addition to log levels.
> Log levels are preset levels I would like to maintain.
>
> What I would like to do is the ability to specify a "trace level" with a
> log
> level....
> e.g.
> Call a MyLogger.info() function while specifying a trace level which
> symbolizes the "importance" of the message and that would serve to decide
> whether to actually audit the messages using the appenders or not.
>
> Asaf Lahav
>
> VP R&D, Prima Grid LTD.
>
> Cellular:  972-54-4717955
>
> Phone:   972-3-6540255
>
> Fax:       972-3-6540254
>
>
>
> -----Original Message-----
> From: Javier Gonzalez [mailto:jagonzal@gmail.com]
> Sent: Wednesday, March 15, 2006 5:39 PM
> To: Log4J Users List
> Subject: Re: Trace level in log4j
>
> If I understand correctly... you want to reimplement logging levels? Or do
> you want to implement a new Level?
>
> On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
> >
> >  Hi,
> >
> > I have been going through the log4j documentation and couldn't find what
> > I'm looking for… so I decided to ask here before I conclude my search.
> >
> > What I am trying to achieve is the ability to define a log4j trace
> level.
> >
> >
> >
> > A trace level is a number which indicates the level (importance) of an
> > audited message.
> >
> >
> >
> > What I would like log4j to do for me, is to actually audit messages that
> > their trace level is higher then a level I will set in the log4j
> > configuration file.
> >
> >
> >
> > I hope what I wrote makes sense J
> >
> > Any help would be appreciated.
> >
> > Thanks in advance,
> >
> >
> >
> > *Asaf Lahav*
> >
> > *VP R&D, Prima Grid LTD.*
> >
> > Cellular:  972-54-4717955
> >
> > Phone:   972-3-6540255
> >
> > Fax:       972-3-6540254
> >
> >
> >
>
>
>
> --
> Javier González Nicolini
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
Javier González Nicolini


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


Re: Trace level in log4j

Posted by Javier Gonzalez <ja...@gmail.com>.
Ok... so you want to implement a "parallel" level hierachy, so that every
log event has a standard log4j level and your added "trace" level?

If that is the case, I think you might be on your own. You want to meddle
deep into the innards of log4j (if I read you correctly, you'll need to
modify Logger, the Appenders you wish to use, possibly Layout, too). Maybe
you could put your trace level in the message text, and set filters on the
appenders?

(Besides, I still don't see how the existing levels fail to do what you want
to achieve - I mean, you could be get, say, DEBUG level messages with high
"trace" level. Does that make sense?)

On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
>
> I am not trying to implement a new log level.
> I would like to specify a trace level, which is an addition to log levels.
> Log levels are preset levels I would like to maintain.
>
> What I would like to do is the ability to specify a "trace level" with a
> log
> level....
> e.g.
> Call a MyLogger.info() function while specifying a trace level which
> symbolizes the "importance" of the message and that would serve to decide
> whether to actually audit the messages using the appenders or not.
>
> Asaf Lahav
>
> VP R&D, Prima Grid LTD.
>
> Cellular:  972-54-4717955
>
> Phone:   972-3-6540255
>
> Fax:       972-3-6540254
>
>
>
> -----Original Message-----
> From: Javier Gonzalez [mailto:jagonzal@gmail.com]
> Sent: Wednesday, March 15, 2006 5:39 PM
> To: Log4J Users List
> Subject: Re: Trace level in log4j
>
> If I understand correctly... you want to reimplement logging levels? Or do
> you want to implement a new Level?
>
> On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
> >
> >  Hi,
> >
> > I have been going through the log4j documentation and couldn't find what
> > I'm looking for… so I decided to ask here before I conclude my search.
> >
> > What I am trying to achieve is the ability to define a log4j trace
> level.
> >
> >
> >
> > A trace level is a number which indicates the level (importance) of an
> > audited message.
> >
> >
> >
> > What I would like log4j to do for me, is to actually audit messages that
> > their trace level is higher then a level I will set in the log4j
> > configuration file.
> >
> >
> >
> > I hope what I wrote makes sense J
> >
> > Any help would be appreciated.
> >
> > Thanks in advance,
> >
> >
> >
> > *Asaf Lahav*
> >
> > *VP R&D, Prima Grid LTD.*
> >
> > Cellular:  972-54-4717955
> >
> > Phone:   972-3-6540255
> >
> > Fax:       972-3-6540254
> >
> >
> >
>
>
>
> --
> Javier González Nicolini
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


--
Javier González Nicolini

Re: Trace level in log4j

Posted by James Stauffer <st...@gmail.com>.
Why can't you just use the normal levels?

On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
> I am not trying to implement a new log level.
> I would like to specify a trace level, which is an addition to log levels.
> Log levels are preset levels I would like to maintain.
>
> What I would like to do is the ability to specify a "trace level" with a log
> level....
> e.g.
> Call a MyLogger.info() function while specifying a trace level which
> symbolizes the "importance" of the message and that would serve to decide
> whether to actually audit the messages using the appenders or not.
>
> Asaf Lahav
>
> VP R&D, Prima Grid LTD.
>
> Cellular:  972-54-4717955
>
> Phone:   972-3-6540255
>
> Fax:       972-3-6540254
>
>
>
> -----Original Message-----
> From: Javier Gonzalez [mailto:jagonzal@gmail.com]
> Sent: Wednesday, March 15, 2006 5:39 PM
> To: Log4J Users List
> Subject: Re: Trace level in log4j
>
> If I understand correctly... you want to reimplement logging levels? Or do
> you want to implement a new Level?
>
> On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
> >
> >  Hi,
> >
> > I have been going through the log4j documentation and couldn't find what
> > I'm looking for… so I decided to ask here before I conclude my search.
> >
> > What I am trying to achieve is the ability to define a log4j trace level.
> >
> >
> >
> > A trace level is a number which indicates the level (importance) of an
> > audited message.
> >
> >
> >
> > What I would like log4j to do for me, is to actually audit messages that
> > their trace level is higher then a level I will set in the log4j
> > configuration file.
> >
> >
> >
> > I hope what I wrote makes sense J
> >
> > Any help would be appreciated.
> >
> > Thanks in advance,
> >
> >
> >
> > *Asaf Lahav*
> >
> > *VP R&D, Prima Grid LTD.*
> >
> > Cellular:  972-54-4717955
> >
> > Phone:   972-3-6540255
> >
> > Fax:       972-3-6540254
> >
> >
> >
>
>
>
> --
> Javier González Nicolini
>
>
> ---------------------------------------------------------------------
> 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: Trace level in log4j

Posted by Asaf Lahav <as...@primagrid.com>.
I am not trying to implement a new log level.
I would like to specify a trace level, which is an addition to log levels.
Log levels are preset levels I would like to maintain.

What I would like to do is the ability to specify a "trace level" with a log
level.... 
e.g.
Call a MyLogger.info() function while specifying a trace level which
symbolizes the "importance" of the message and that would serve to decide
whether to actually audit the messages using the appenders or not.

Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254

 

-----Original Message-----
From: Javier Gonzalez [mailto:jagonzal@gmail.com] 
Sent: Wednesday, March 15, 2006 5:39 PM
To: Log4J Users List
Subject: Re: Trace level in log4j

If I understand correctly... you want to reimplement logging levels? Or do
you want to implement a new Level?

On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
>
>  Hi,
>
> I have been going through the log4j documentation and couldn't find what
> I'm looking for… so I decided to ask here before I conclude my search.
>
> What I am trying to achieve is the ability to define a log4j trace level.
>
>
>
> A trace level is a number which indicates the level (importance) of an
> audited message.
>
>
>
> What I would like log4j to do for me, is to actually audit messages that
> their trace level is higher then a level I will set in the log4j
> configuration file.
>
>
>
> I hope what I wrote makes sense J
>
> Any help would be appreciated.
>
> Thanks in advance,
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular:  972-54-4717955
>
> Phone:   972-3-6540255
>
> Fax:       972-3-6540254
>
>
>



--
Javier González Nicolini


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


Re: Trace level in log4j

Posted by Javier Gonzalez <ja...@gmail.com>.
If I understand correctly... you want to reimplement logging levels? Or do
you want to implement a new Level?

On 3/15/06, Asaf Lahav <as...@primagrid.com> wrote:
>
>  Hi,
>
> I have been going through the log4j documentation and couldn't find what
> I'm looking for… so I decided to ask here before I conclude my search.
>
> What I am trying to achieve is the ability to define a log4j trace level.
>
>
>
> A trace level is a number which indicates the level (importance) of an
> audited message.
>
>
>
> What I would like log4j to do for me, is to actually audit messages that
> their trace level is higher then a level I will set in the log4j
> configuration file.
>
>
>
> I hope what I wrote makes sense J
>
> Any help would be appreciated.
>
> Thanks in advance,
>
>
>
> *Asaf Lahav*
>
> *VP R&D, Prima Grid LTD.*
>
> Cellular:  972-54-4717955
>
> Phone:   972-3-6540255
>
> Fax:       972-3-6540254
>
>
>



--
Javier González Nicolini