logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Gonzalez" <jagon...@gmail.com>
Subject Re: Trace level in log4j
Date Wed, 15 Mar 2006 16:54:30 GMT
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 <asaf.lahav@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 <asaf.lahav@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message