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 vincentw <vi...@yahoo.com> on 2006/11/09 01:03:41 UTC

Filters

Hi,

I'm trying to filter the log message and I can do it.  But I what I would
like to do is, keep track of how many times the message was filtered, and
when a new message comes in, log how many times the previous message was
filtered and then the new message.  

I tried using the a logger inside that class but I think I remember reading
something about can't log inside of log4j.

So how can I go about this?

Thanks

vincent
-- 
View this message in context: http://www.nabble.com/Filters-tf2598830.html#a7249900
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: Filters

Posted by James Stauffer <st...@gmail.com>.
Then I would suggest looking toto modifying the LoggingEvent message.

On 11/9/06, vincentw <vi...@yahoo.com> wrote:
>
> darn...I believe we are using 1.29
>
>
> Jacob Kjome wrote:
> >
> > Quoting James Stauffer <st...@gmail.com>:
> >
> >> Code in log4j should only use LogLog for logging
> >
> > Note that this is true for Log4j versions previous to 1.3alpha, but as of
> > 1.3alpha, Log4j uses itself for logging (except for the short time prior
> > to
> > bootstrapping itself).
> >
> > Jake
> >
> >>, which is only sent
> >> to standard out.  I don't have any good ideas unless you change the
> >> message of the LogEvent that gets through.
> >>
> >> On 11/8/06, vincentw <vi...@yahoo.com> wrote:
> >> >
> >> > Hi,
> >> >
> >> > I'm trying to filter the log message and I can do it.  But I what I
> >> would
> >> > like to do is, keep track of how many times the message was filtered,
> >> and
> >> > when a new message comes in, log how many times the previous message
> >> was
> >> > filtered and then the new message.
> >> >
> >> > I tried using the a logger inside that class but I think I remember
> >> reading
> >> > something about can't log inside of log4j.
> >> >
> >> > So how can I go about this?
> >> >
> >> > Thanks
> >> >
> >> > vincent
> >> > --
> >> > View this message in context:
> >> http://www.nabble.com/Filters-tf2598830.html#a7249900
> >> > Sent from the Log4j - Users mailing list archive at Nabble.com.
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >> >
> >> >
> >>
> >>
> >> --
> >> James Stauffer        http://www.geocities.com/stauffer_james/
> >> 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
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-log-inside-a-filter-tf2598830.html#a7266845
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
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: Filters

Posted by vincentw <vi...@yahoo.com>.
darn...I believe we are using 1.29


Jacob Kjome wrote:
> 
> Quoting James Stauffer <st...@gmail.com>:
> 
>> Code in log4j should only use LogLog for logging
> 
> Note that this is true for Log4j versions previous to 1.3alpha, but as of
> 1.3alpha, Log4j uses itself for logging (except for the short time prior
> to
> bootstrapping itself).
> 
> Jake
> 
>>, which is only sent
>> to standard out.  I don't have any good ideas unless you change the
>> message of the LogEvent that gets through.
>>
>> On 11/8/06, vincentw <vi...@yahoo.com> wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to filter the log message and I can do it.  But I what I
>> would
>> > like to do is, keep track of how many times the message was filtered,
>> and
>> > when a new message comes in, log how many times the previous message
>> was
>> > filtered and then the new message.
>> >
>> > I tried using the a logger inside that class but I think I remember
>> reading
>> > something about can't log inside of log4j.
>> >
>> > So how can I go about this?
>> >
>> > Thanks
>> >
>> > vincent
>> > --
>> > View this message in context:
>> http://www.nabble.com/Filters-tf2598830.html#a7249900
>> > Sent from the Log4j - Users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> > For additional commands, e-mail: log4j-user-help@logging.apache.org
>> >
>> >
>>
>>
>> --
>> James Stauffer        http://www.geocities.com/stauffer_james/
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-log-inside-a-filter-tf2598830.html#a7266845
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: Filters

Posted by Jacob Kjome <ho...@visi.com>.
Quoting James Stauffer <st...@gmail.com>:

> Code in log4j should only use LogLog for logging

Note that this is true for Log4j versions previous to 1.3alpha, but as of
1.3alpha, Log4j uses itself for logging (except for the short time prior to
bootstrapping itself).

Jake

>, which is only sent
> to standard out.  I don't have any good ideas unless you change the
> message of the LogEvent that gets through.
>
> On 11/8/06, vincentw <vi...@yahoo.com> wrote:
> >
> > Hi,
> >
> > I'm trying to filter the log message and I can do it.  But I what I would
> > like to do is, keep track of how many times the message was filtered, and
> > when a new message comes in, log how many times the previous message was
> > filtered and then the new message.
> >
> > I tried using the a logger inside that class but I think I remember reading
> > something about can't log inside of log4j.
> >
> > So how can I go about this?
> >
> > Thanks
> >
> > vincent
> > --
> > View this message in context:
> http://www.nabble.com/Filters-tf2598830.html#a7249900
> > Sent from the Log4j - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer        http://www.geocities.com/stauffer_james/
> 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: Filters

Posted by James Stauffer <st...@gmail.com>.
Code in log4j should only use LogLog for logging, which is only sent
to standard out.  I don't have any good ideas unless you change the
message of the LogEvent that gets through.

On 11/8/06, vincentw <vi...@yahoo.com> wrote:
>
> Hi,
>
> I'm trying to filter the log message and I can do it.  But I what I would
> like to do is, keep track of how many times the message was filtered, and
> when a new message comes in, log how many times the previous message was
> filtered and then the new message.
>
> I tried using the a logger inside that class but I think I remember reading
> something about can't log inside of log4j.
>
> So how can I go about this?
>
> Thanks
>
> vincent
> --
> View this message in context: http://www.nabble.com/Filters-tf2598830.html#a7249900
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
James Stauffer        http://www.geocities.com/stauffer_james/
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