You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2010/06/04 20:30:36 UTC

Should Tapestry log incoming requests?

I tend to get a bit frustrated, switching between versions of Jetty and
different logging frameworks. I like to be able to see incoming requests
(espcially helpful for tracking down Ajax problems), but sometimes its hard
to get Jetty to produce the NCSA log.

I keep creating a HttpServletRequestFilter that does logging for me. I find
this format quite readable:

INFO  RequestLoggingFilter - [200]  GET /login
                                        15 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/default.css
  5 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/blackbird_1_0/blackbird.css
  1 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/scriptaculous_1_8_2/scriptaculous.js
 1 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/scriptaculous_1_8_2/prototype.js
 3 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/tapestry-messages.js
 1 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/blackbird_1_0/blackbird.js
 3 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/tapestry.js
  1 ms
INFO  RequestLoggingFilter - [304]  GET
/assets/7dcc8a61d3c24b38/core/scriptaculous_1_8_2/effects.js
 3 ms

(That's quite readable in a san serif font)

I can see this filter being part of Tapestry, but only used (by default)
when in development mode (not production mode).  Thoughts?

-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Should Tapestry log incoming requests?

Posted by Howard Lewis Ship <hl...@gmail.com>.
For me, it's useful to see that the server is receiving requests, and also
how long the server thinks it took to process the request.

On Fri, Jun 4, 2010 at 5:40 PM, Ulrich Stärk <ul...@spielviel.de> wrote:

> I agree. One of the first things I do is turn of that unspecific logging of
> all requests. If I need to investigate something I'm using firebug for much
> more concise information. I wouldn't mind having such a feature though.
>
> Uli
>
>
> On 05.06.2010 00:29, Andreas Andreou wrote:
>
>> I'm usually annoyed by this kind of logging (too much output), so i just
>> disable it (i get the same and more + bettere structured info from
>> firebug or charles) -
>> but i wouldn't object to the change
>>
>> On Fri, Jun 4, 2010 at 22:20, Howard Lewis Ship<hl...@gmail.com>  wrote:
>>
>>> Should have said; this is just for logging to the console (or as
>>> configured
>>> in log4j.properties, logback.xml, or whatever).
>>>
>>> On Fri, Jun 4, 2010 at 12:17 PM, Josh Canfield<joshcanfield@gmail.com
>>> >wrote:
>>>
>>>  I can see this filter being part of Tapestry, but only used (by default)
>>>>>> when in development mode (not production mode).  Thoughts?
>>>>>>
>>>>>
>>>>> There's no reason to not add it. Just provide a symbol for turning it
>>>>> on
>>>>>
>>>> and
>>>>
>>>>> off and another for the log location (if they don't exist yet).
>>>>>
>>>>
>>>> Seems useful. The only reason I'd hesitate adding things like this is
>>>> that it seems pretty trivial to implement and I'm a fan of a lean core
>>>> that makes these things trivial! Inevitably someone is going to want
>>>> to bulk it out with features to enhance the format, or limit which
>>>> pages are logged or include session variables or whatever.
>>>>
>>>> Anyway, this seems like an enhanced Timing Filter from the maven
>>>> archetype (which I actually use in production slightly modified to
>>>> report long running page renders) and maybe it makes a good example in
>>>> the docs for how to create a simple filter.
>>>>
>>>> If it makes it in to the core then definitely use a new symbol for
>>>> enabling and disabling, but shouldn't we leave the logging location up
>>>> to the log implementation?
>>>>
>>>> Josh
>>>>
>>>> On Fri, Jun 4, 2010 at 11:40 AM, Thiago H. de Paula Figueiredo
>>>> <th...@gmail.com>  wrote:
>>>>
>>>>> On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship<hlship@gmail.com
>>>>> >
>>>>> wrote:
>>>>>
>>>>>  I can see this filter being part of Tapestry, but only used (by
>>>>>> default)
>>>>>> when in development mode (not production mode).  Thoughts?
>>>>>>
>>>>>
>>>>> There's no reason to not add it. Just provide a symbol for turning it
>>>>> on
>>>>>
>>>> and
>>>>
>>>>> off and another for the log location (if they don't exist yet).
>>>>>
>>>>> --
>>>>> Thiago H. de Paula Figueiredo
>>>>> Independent Java, Apache Tapestry 5 and Hibernate consultant,
>>>>> developer,
>>>>>
>>>> and
>>>>
>>>>> instructor
>>>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>>>> http://www.arsmachina.com.br
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> http://www.bodylabgym.com - a private, by appointment only, one-on-one
>>>> health and fitness facility.
>>>> --
>>>> http://www.ectransition.com - Quality Electronic Cigarettes at a
>>>> reasonable price!
>>>> --
>>>> TheDailyTube.com. Sign up and get the best new videos on the internet
>>>> delivered fresh to your inbox.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn
>>> how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Should Tapestry log incoming requests?

Posted by Ulrich Stärk <ul...@spielviel.de>.
I agree. One of the first things I do is turn of that unspecific logging of all requests. If I need 
to investigate something I'm using firebug for much more concise information. I wouldn't mind having 
such a feature though.

Uli

On 05.06.2010 00:29, Andreas Andreou wrote:
> I'm usually annoyed by this kind of logging (too much output), so i just
> disable it (i get the same and more + bettere structured info from
> firebug or charles) -
> but i wouldn't object to the change
>
> On Fri, Jun 4, 2010 at 22:20, Howard Lewis Ship<hl...@gmail.com>  wrote:
>> Should have said; this is just for logging to the console (or as configured
>> in log4j.properties, logback.xml, or whatever).
>>
>> On Fri, Jun 4, 2010 at 12:17 PM, Josh Canfield<jo...@gmail.com>wrote:
>>
>>>>> I can see this filter being part of Tapestry, but only used (by default)
>>>>> when in development mode (not production mode).  Thoughts?
>>>>
>>>> There's no reason to not add it. Just provide a symbol for turning it on
>>> and
>>>> off and another for the log location (if they don't exist yet).
>>>
>>> Seems useful. The only reason I'd hesitate adding things like this is
>>> that it seems pretty trivial to implement and I'm a fan of a lean core
>>> that makes these things trivial! Inevitably someone is going to want
>>> to bulk it out with features to enhance the format, or limit which
>>> pages are logged or include session variables or whatever.
>>>
>>> Anyway, this seems like an enhanced Timing Filter from the maven
>>> archetype (which I actually use in production slightly modified to
>>> report long running page renders) and maybe it makes a good example in
>>> the docs for how to create a simple filter.
>>>
>>> If it makes it in to the core then definitely use a new symbol for
>>> enabling and disabling, but shouldn't we leave the logging location up
>>> to the log implementation?
>>>
>>> Josh
>>>
>>> On Fri, Jun 4, 2010 at 11:40 AM, Thiago H. de Paula Figueiredo
>>> <th...@gmail.com>  wrote:
>>>> On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship<hl...@gmail.com>
>>>> wrote:
>>>>
>>>>> I can see this filter being part of Tapestry, but only used (by default)
>>>>> when in development mode (not production mode).  Thoughts?
>>>>
>>>> There's no reason to not add it. Just provide a symbol for turning it on
>>> and
>>>> off and another for the log location (if they don't exist yet).
>>>>
>>>> --
>>>> Thiago H. de Paula Figueiredo
>>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>>> and
>>>> instructor
>>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>>> http://www.arsmachina.com.br
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> http://www.bodylabgym.com - a private, by appointment only, one-on-one
>>> health and fitness facility.
>>> --
>>> http://www.ectransition.com - Quality Electronic Cigarettes at a
>>> reasonable price!
>>> --
>>> TheDailyTube.com. Sign up and get the best new videos on the internet
>>> delivered fresh to your inbox.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to learn
>> how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Should Tapestry log incoming requests?

Posted by Andreas Andreou <an...@di.uoa.gr>.
I'm usually annoyed by this kind of logging (too much output), so i just
disable it (i get the same and more + bettere structured info from
firebug or charles) -
but i wouldn't object to the change

On Fri, Jun 4, 2010 at 22:20, Howard Lewis Ship <hl...@gmail.com> wrote:
> Should have said; this is just for logging to the console (or as configured
> in log4j.properties, logback.xml, or whatever).
>
> On Fri, Jun 4, 2010 at 12:17 PM, Josh Canfield <jo...@gmail.com>wrote:
>
>> >> I can see this filter being part of Tapestry, but only used (by default)
>> >> when in development mode (not production mode).  Thoughts?
>> >
>> > There's no reason to not add it. Just provide a symbol for turning it on
>> and
>> > off and another for the log location (if they don't exist yet).
>>
>> Seems useful. The only reason I'd hesitate adding things like this is
>> that it seems pretty trivial to implement and I'm a fan of a lean core
>> that makes these things trivial! Inevitably someone is going to want
>> to bulk it out with features to enhance the format, or limit which
>> pages are logged or include session variables or whatever.
>>
>> Anyway, this seems like an enhanced Timing Filter from the maven
>> archetype (which I actually use in production slightly modified to
>> report long running page renders) and maybe it makes a good example in
>> the docs for how to create a simple filter.
>>
>> If it makes it in to the core then definitely use a new symbol for
>> enabling and disabling, but shouldn't we leave the logging location up
>> to the log implementation?
>>
>> Josh
>>
>> On Fri, Jun 4, 2010 at 11:40 AM, Thiago H. de Paula Figueiredo
>> <th...@gmail.com> wrote:
>> > On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship <hl...@gmail.com>
>> > wrote:
>> >
>> >> I can see this filter being part of Tapestry, but only used (by default)
>> >> when in development mode (not production mode).  Thoughts?
>> >
>> > There's no reason to not add it. Just provide a symbol for turning it on
>> and
>> > off and another for the log location (if they don't exist yet).
>> >
>> > --
>> > Thiago H. de Paula Figueiredo
>> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and
>> > instructor
>> > Owner, Ars Machina Tecnologia da Informação Ltda.
>> > http://www.arsmachina.com.br
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: dev-help@tapestry.apache.org
>> >
>> >
>>
>>
>>
>> --
>> --
>> http://www.bodylabgym.com - a private, by appointment only, one-on-one
>> health and fitness facility.
>> --
>> http://www.ectransition.com - Quality Electronic Cigarettes at a
>> reasonable price!
>> --
>> TheDailyTube.com. Sign up and get the best new videos on the internet
>> delivered fresh to your inbox.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>
>>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to learn
> how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Should Tapestry log incoming requests?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Should have said; this is just for logging to the console (or as configured
in log4j.properties, logback.xml, or whatever).

On Fri, Jun 4, 2010 at 12:17 PM, Josh Canfield <jo...@gmail.com>wrote:

> >> I can see this filter being part of Tapestry, but only used (by default)
> >> when in development mode (not production mode).  Thoughts?
> >
> > There's no reason to not add it. Just provide a symbol for turning it on
> and
> > off and another for the log location (if they don't exist yet).
>
> Seems useful. The only reason I'd hesitate adding things like this is
> that it seems pretty trivial to implement and I'm a fan of a lean core
> that makes these things trivial! Inevitably someone is going to want
> to bulk it out with features to enhance the format, or limit which
> pages are logged or include session variables or whatever.
>
> Anyway, this seems like an enhanced Timing Filter from the maven
> archetype (which I actually use in production slightly modified to
> report long running page renders) and maybe it makes a good example in
> the docs for how to create a simple filter.
>
> If it makes it in to the core then definitely use a new symbol for
> enabling and disabling, but shouldn't we leave the logging location up
> to the log implementation?
>
> Josh
>
> On Fri, Jun 4, 2010 at 11:40 AM, Thiago H. de Paula Figueiredo
> <th...@gmail.com> wrote:
> > On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship <hl...@gmail.com>
> > wrote:
> >
> >> I can see this filter being part of Tapestry, but only used (by default)
> >> when in development mode (not production mode).  Thoughts?
> >
> > There's no reason to not add it. Just provide a symbol for turning it on
> and
> > off and another for the log location (if they don't exist yet).
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and
> > instructor
> > Owner, Ars Machina Tecnologia da Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
>
> --
> --
> http://www.bodylabgym.com - a private, by appointment only, one-on-one
> health and fitness facility.
> --
> http://www.ectransition.com - Quality Electronic Cigarettes at a
> reasonable price!
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: Should Tapestry log incoming requests?

Posted by Josh Canfield <jo...@gmail.com>.
>> I can see this filter being part of Tapestry, but only used (by default)
>> when in development mode (not production mode).  Thoughts?
>
> There's no reason to not add it. Just provide a symbol for turning it on and
> off and another for the log location (if they don't exist yet).

Seems useful. The only reason I'd hesitate adding things like this is
that it seems pretty trivial to implement and I'm a fan of a lean core
that makes these things trivial! Inevitably someone is going to want
to bulk it out with features to enhance the format, or limit which
pages are logged or include session variables or whatever.

Anyway, this seems like an enhanced Timing Filter from the maven
archetype (which I actually use in production slightly modified to
report long running page renders) and maybe it makes a good example in
the docs for how to create a simple filter.

If it makes it in to the core then definitely use a new symbol for
enabling and disabling, but shouldn't we leave the logging location up
to the log implementation?

Josh

On Fri, Jun 4, 2010 at 11:40 AM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship <hl...@gmail.com>
> wrote:
>
>> I can see this filter being part of Tapestry, but only used (by default)
>> when in development mode (not production mode).  Thoughts?
>
> There's no reason to not add it. Just provide a symbol for turning it on and
> off and another for the log location (if they don't exist yet).
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Should Tapestry log incoming requests?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 04 Jun 2010 15:30:36 -0300, Howard Lewis Ship <hl...@gmail.com>  
wrote:

> I can see this filter being part of Tapestry, but only used (by default)
> when in development mode (not production mode).  Thoughts?

There's no reason to not add it. Just provide a symbol for turning it on  
and off and another for the log location (if they don't exist yet).

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org