You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Violeta Georgieva <mi...@gmail.com> on 2015/04/01 12:31:58 UTC

Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Hi,

2015-03-30 10:27 GMT+03:00 Polina Genova <po...@gmail.com>:
>
> Hi,
>
>
>
> Recently I came across an issue with excessive number of blocks of blank
> lines being logged in the catalina output logs.
>
> This is easily reproducible by simply starting a clean Tomcat 7.0.59
server
> with enabled the following logger configuration
>
> org.apache.tomcat.util.digester.Digester.level = FINEST
>
> The result is enormous catalina log file containing plenty of logs like
the
> following:
>
> --------------------------------------------------------------
>
> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> startElement
>
> FINE:   Pushing body text '
>
>
>
>
>
>
>
>   '
>
> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
endElement
>
> FINE:   Popping body text '
>
>
>
>
>
>
>
>   '
>
> --------------------------------------------------------------
>
> The number of empty lines increases up to hundreds in a single log
message.
>
> Actually this depends on the number of new lines being accumulated so far
> for the surrounding xml element of the currently processed one.
>
> For example when processing the default global server.xml, on invocation
of
> the startElement and stopElement of each inner element
>
> the surrounding ‘Server’ element’s accumulated body is being logged and it
> consists only of new lines, i.e. no meaningful content.
>
> As the logged information can bring such a large blocks of empty lines and
> no valuable information, I’d like to propose these debug messages to be
> removed.
>
> Can you think of a specific reason to preserve them?
>

I checked that and I think that the log messages can be removed as they do
not give any valuable information, only empty rows in the log.

Regards,
Violeta

>
> Here’s a patch:
>
> --- Digester.java               (revision 1669608)
>
> +++ Digester.java            (working copy)
>
> @@ -1047,9 +1047,6 @@
>
>
>
>          // Recover the body text from the surrounding element
>
>          bodyText = bodyTexts.pop();
>
> -        if (debug) {
>
> -            log.debug("  Popping body text '" + bodyText.toString() +
"'");
>
> -        }
>
>
>
>          // Fire "end" events for all relevant rules in reverse order
>
>          if (rules != null) {
>
> @@ -1252,9 +1249,7 @@
>
>
>
>          // Save the body text accumulated for our surrounding element
>
>          bodyTexts.push(bodyText);
>
> -        if (debug) {
>
> -            log.debug("  Pushing body text '" + bodyText.toString() +
"'");
>
> -        }
>
>
>
> On a closer look of the Digester class, it seems that the whole structure
> of previously accumulated bodyTexts could be removed, for the bodyText
> values being pushed and popped from it
>
> are used only in the mentioned debug messages.
>
> So what do you think is the better approach?
>
>
>
> Thanks and regards,
>
> Polina

Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 4/2/15 4:47 AM, Mark Thomas wrote:
> On 01/04/2015 21:04, Violeta Georgieva wrote:
>> 2015-04-01 17:01 GMT+03:00 Violeta Georgieva
>> <mi...@gmail.com>:
>>> 2015-04-01 14:30 GMT+03:00 Konstantin Kolinko
>>> <kn...@gmail.com>:
> 
> <snip/>
> 
>>>> 1) What about elements with non-empty bodies? E.g. web.xml.
>>>> 
>>>> I do not believe that it is all only whitespace.
>>>> 
>>>> Are element bodies also logged elsewhere?
>>>> 
>>>> 2) Sometimes people make a mistake misplacing ">"  or
>>>> forgetting ">" and what they expect to be attributes actually
>>>> happens to be in body of an XML element.
>>>> 
>>>> http://markmail.org/message/uvdwl5dm3rwhyyt5
>>>> 
>>>> 3) If someone voluntary turns on debug logging,  one should
>>>> expect to deal with debug information.
>>>> 
>>>> I do not see why that information should be "user-friendly".
>>>> If someone is interested in debugging that component, it
>>>> shall just dump what you have.
>>>> 
>>>> 4)  One should be able to filter unwanted log messages in 
>>>> java.util.logging. (There exists java.util.logging.Filter
>>>> interface. Somewhere should be useful implementations of
>>>> it.)
>>> 
>>> 1) 2) Here [1] I described what kind of checks I performed.
>>> 
>>> 3) 4) I agree, but if the log entry does not give us any
>>> information it is
>> useless.
>> 
>> My extensive testing shows that there are only whitespaces. As
>> there were concerns in the previous messages, my proposals are: 
>> 1) Either we can keep the debug messages and 'trim' the
>> 'bodyText' that will be printed. 2) Or I can revert the whole
>> change.
>> 
>> What do you think?
> 
> The concerns expressed were based on the view that there might be
> cases where these debug logs would show something other than blank
> lines.
> 
> Your extensive testing hasn't found any cases where these debug
> logs contained something other than whitespace.
> 
> Having reviewed your tests, no further tests stood out as
> possibilities that might generate non-whitespace log lines.
> 
> Unless someone can come up with a configuration that causes these
> debug messages to display something other whitespace then I think
> the concerns are unfounded and that there is no need to revert the
> commit.

I'll take a look at providing a use case. The bodyText buffer is
appended when characters(char[],int,length) is called and reset after
endElement is complete. It would seem that "bodyText" would be
"pushed" any time there is an element containing text which contains
another element.

e.g.:

  <parent>
     Here is some text.
     <child>   <--- here's where Digester.startElement would "push"
                    the bodyText "Here is some text" plus surrounding
                    whitespace.
       ...
     </child>
  </parent>

I'm not sure that ever happens in web.xml, server.xml, or context.xml
where the bodyText would be anything besides whitespace.

> A different (and perhaps more useful) question would be how can we
> get the digester to emit useful debug messages (e.g. the xml
> snippet currently being processed)?

If you set the log level for
org.apache.tomcat.util.digester.Digester.sax, you'll get notified of
all the SAX events. I haven't looked at the code for the rules, but I
expect that they announce the work they are doing as well.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVHTQJAAoJEBzwKT+lPKRYtC8P/0doZTlsEDCFzNWHG2nlAYnj
NuTRG58yRds6q5fKDqAU8iOILq8xqdF9V/W7IQwFJ8toJZW3LjiZnmEBHiuEiThh
R6AhvIHsfClEkepEOUEdnumO1nqo24nJumNufeIxZVHWY+qTghS++rxkmePCVw8h
uUUvCrJr7v8V2MUPd9moZu1iE4w9SkO/1EdWWppBeEcKYh+jsLtVQJyq1fmu1Ia1
BYwt9f3MtMS0dkHQd1zhZN7CbvGaw4dyy40JmvIm/rGzd4rdUwaBWHfRnv8fN2ao
19cHsI4eZ3+XBbwgF0wLDsMHni5R3RTXfg2CXq60uOfbvvbNVo370KfjZhr88G0P
vA/yOcffiq0G1MLfqgKR9Zs3u20ASJDUs3foRzsls/ZN7rqh0PW0OuPDxTivC2XA
H2ax4xb+sw787Gv9uB/RWM/S4BNxy8eNtZIsN+w5SONRMKbm9dH/v6aVJ6Gn4Xrv
NC0AUv0cKg8/3YmJB7qEGATKydh4RLJ4gDfEbFeD3HA5JM8QRuLcdv9QziH/Ilc4
AhNzBw2ATukBp9M7jYRVJJvtd8UwU/Kcoi7CZNQWnPmrb7tOK0bfq4hgyxDOpP3G
HLQ0Sb6RcJ15gwsggKA4ozMnUVN5Qti/d3dKU5Le5KjaH4SmhKlyFWikzFD4+c3e
1EYrob0dkaBwOpOeCdBh
=wFi+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Mark Thomas <ma...@apache.org>.
On 01/04/2015 21:04, Violeta Georgieva wrote:
> 2015-04-01 17:01 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
>> 2015-04-01 14:30 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:

<snip/>

>>> 1) What about elements with non-empty bodies?
>>> E.g. web.xml.
>>>
>>> I do not believe that it is all only whitespace.
>>>
>>> Are element bodies also logged elsewhere?
>>>
>>> 2) Sometimes people make a mistake misplacing ">"  or forgetting ">"
>>> and what they expect to be attributes actually happens to be in body
>>> of an XML element.
>>>
>>> http://markmail.org/message/uvdwl5dm3rwhyyt5
>>>
>>> 3) If someone voluntary turns on debug logging,  one should expect to
>>> deal with debug information.
>>>
>>> I do not see why that information should be "user-friendly". If
>>> someone is interested in debugging that component, it shall just dump
>>> what you have.
>>>
>>> 4)  One should be able to filter unwanted log messages in
>>> java.util.logging. (There exists java.util.logging.Filter interface.
>>> Somewhere should be useful implementations of it.)
>>
>> 1) 2)
>> Here [1] I described what kind of checks I performed.
>>
>> 3) 4)
>> I agree, but if the log entry does not give us any information it is
> useless.
> 
> My extensive testing shows that there are only whitespaces.
> As there were concerns in the previous messages, my proposals are:
> 1) Either we can keep the debug messages and 'trim' the 'bodyText' that
> will be printed.
> 2) Or I can revert the whole change.
> 
> What do you think?

The concerns expressed were based on the view that there might be cases
where these debug logs would show something other than blank lines.

Your extensive testing hasn't found any cases where these debug logs
contained something other than whitespace.

Having reviewed your tests, no further tests stood out as possibilities
that might generate non-whitespace log lines.

Unless someone can come up with a configuration that causes these debug
messages to display something other whitespace then I think the concerns
are unfounded and that there is no need to revert the commit.

A different (and perhaps more useful) question would be how can we get
the digester to emit useful debug messages (e.g. the xml snippet
currently being processed)?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Violeta Georgieva <mi...@gmail.com>.
Hi,

2015-04-01 17:01 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
>
> Hi,
>
>
> 2015-04-01 14:30 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:
> >
> > 2015-04-01 13:31 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
> > > Hi,
> > >
> > > 2015-03-30 10:27 GMT+03:00 Polina Genova <po...@gmail.com>:
> > >>
> > >> Hi,
> > >>
> > >>
> > >>
> > >> Recently I came across an issue with excessive number of blocks of
blank
> > >> lines being logged in the catalina output logs.
> > >>
> > >> This is easily reproducible by simply starting a clean Tomcat 7.0.59
> > > server
> > >> with enabled the following logger configuration
> > >>
> > >> org.apache.tomcat.util.digester.Digester.level = FINEST
> > >>
> > >> The result is enormous catalina log file containing plenty of logs
like
> > > the
> > >> following:
> > >>
> > >> --------------------------------------------------------------
> > >>
> > >> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> > >> startElement
> > >>
> > >> FINE:   Pushing body text '
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>   '
> > >>
> > >> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> > > endElement
> > >>
> > >> FINE:   Popping body text '
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>   '
> > >>
> > >> --------------------------------------------------------------
> > >>
> > >> The number of empty lines increases up to hundreds in a single log
> > > message.
> > >>
> > >> Actually this depends on the number of new lines being accumulated
so far
> > >> for the surrounding xml element of the currently processed one.
> > >>
> > >> For example when processing the default global server.xml, on
invocation
> > > of
> > >> the startElement and stopElement of each inner element
> > >>
> > >> the surrounding ‘Server’ element’s accumulated body is being logged
and it
> > >> consists only of new lines, i.e. no meaningful content.
> > >>
> > >> As the logged information can bring such a large blocks of empty
lines and
> > >> no valuable information, I’d like to propose these debug messages to
be
> > >> removed.
> > >>
> > >> Can you think of a specific reason to preserve them?
> > >>
> > >
> > > I checked that and I think that the log messages can be removed as
they do
> > > not give any valuable information, only empty rows in the log.
> > >
> >
> > 1) What about elements with non-empty bodies?
> > E.g. web.xml.
> >
> > I do not believe that it is all only whitespace.
> >
> > Are element bodies also logged elsewhere?
> >
> > 2) Sometimes people make a mistake misplacing ">"  or forgetting ">"
> > and what they expect to be attributes actually happens to be in body
> > of an XML element.
> >
> > http://markmail.org/message/uvdwl5dm3rwhyyt5
> >
> > 3) If someone voluntary turns on debug logging,  one should expect to
> > deal with debug information.
> >
> > I do not see why that information should be "user-friendly". If
> > someone is interested in debugging that component, it shall just dump
> > what you have.
> >
> > 4)  One should be able to filter unwanted log messages in
> > java.util.logging. (There exists java.util.logging.Filter interface.
> > Somewhere should be useful implementations of it.)
>
> 1) 2)
> Here [1] I described what kind of checks I performed.
>
> 3) 4)
> I agree, but if the log entry does not give us any information it is
useless.

My extensive testing shows that there are only whitespaces.
As there were concerns in the previous messages, my proposals are:
1) Either we can keep the debug messages and 'trim' the 'bodyText' that
will be printed.
2) Or I can revert the whole change.

What do you think?

Regards,
Violeta

> Regards,
> Violeta
>
> [1] http://marc.info/?l=tomcat-dev&m=142789504501158&w=2
>
> > Best regards,
> > Konstantin Kolinko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >

Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Violeta Georgieva <mi...@gmail.com>.
Hi,

2015-04-01 14:30 GMT+03:00 Konstantin Kolinko <kn...@gmail.com>:
>
> 2015-04-01 13:31 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
> > Hi,
> >
> > 2015-03-30 10:27 GMT+03:00 Polina Genova <po...@gmail.com>:
> >>
> >> Hi,
> >>
> >>
> >>
> >> Recently I came across an issue with excessive number of blocks of
blank
> >> lines being logged in the catalina output logs.
> >>
> >> This is easily reproducible by simply starting a clean Tomcat 7.0.59
> > server
> >> with enabled the following logger configuration
> >>
> >> org.apache.tomcat.util.digester.Digester.level = FINEST
> >>
> >> The result is enormous catalina log file containing plenty of logs like
> > the
> >> following:
> >>
> >> --------------------------------------------------------------
> >>
> >> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> >> startElement
> >>
> >> FINE:   Pushing body text '
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>   '
> >>
> >> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> > endElement
> >>
> >> FINE:   Popping body text '
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>   '
> >>
> >> --------------------------------------------------------------
> >>
> >> The number of empty lines increases up to hundreds in a single log
> > message.
> >>
> >> Actually this depends on the number of new lines being accumulated so
far
> >> for the surrounding xml element of the currently processed one.
> >>
> >> For example when processing the default global server.xml, on
invocation
> > of
> >> the startElement and stopElement of each inner element
> >>
> >> the surrounding ‘Server’ element’s accumulated body is being logged
and it
> >> consists only of new lines, i.e. no meaningful content.
> >>
> >> As the logged information can bring such a large blocks of empty lines
and
> >> no valuable information, I’d like to propose these debug messages to be
> >> removed.
> >>
> >> Can you think of a specific reason to preserve them?
> >>
> >
> > I checked that and I think that the log messages can be removed as they
do
> > not give any valuable information, only empty rows in the log.
> >
>
> 1) What about elements with non-empty bodies?
> E.g. web.xml.
>
> I do not believe that it is all only whitespace.
>
> Are element bodies also logged elsewhere?
>
> 2) Sometimes people make a mistake misplacing ">"  or forgetting ">"
> and what they expect to be attributes actually happens to be in body
> of an XML element.
>
> http://markmail.org/message/uvdwl5dm3rwhyyt5
>
> 3) If someone voluntary turns on debug logging,  one should expect to
> deal with debug information.
>
> I do not see why that information should be "user-friendly". If
> someone is interested in debugging that component, it shall just dump
> what you have.
>
> 4)  One should be able to filter unwanted log messages in
> java.util.logging. (There exists java.util.logging.Filter interface.
> Somewhere should be useful implementations of it.)

1) 2)
Here [1] I described what kind of checks I performed.

3) 4)
I agree, but if the log entry does not give us any information it is
useless.

Regards,
Violeta

[1] http://marc.info/?l=tomcat-dev&m=142789504501158&w=2

> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Konstantin,

On 4/1/15 7:30 AM, Konstantin Kolinko wrote:
> 2015-04-01 13:31 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
>> Hi,
>> 
>> 2015-03-30 10:27 GMT+03:00 Polina Genova
>> <po...@gmail.com>:
>>> 
>>> Hi,
>>> 
>>> 
>>> 
>>> Recently I came across an issue with excessive number of blocks
>>> of blank lines being logged in the catalina output logs.
>>> 
>>> This is easily reproducible by simply starting a clean Tomcat
>>> 7.0.59
>> server
>>> with enabled the following logger configuration
>>> 
>>> org.apache.tomcat.util.digester.Digester.level = FINEST
>>> 
>>> The result is enormous catalina log file containing plenty of
>>> logs like
>> the
>>> following:
>>> 
>>> --------------------------------------------------------------
>>> 
>>> Mar 26, 2015 6:12:48 PM
>>> org.apache.tomcat.util.digester.Digester startElement
>>> 
>>> FINE:   Pushing body text '
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> '
>>> 
>>> Mar 26, 2015 6:12:48 PM
>>> org.apache.tomcat.util.digester.Digester
>> endElement
>>> 
>>> FINE:   Popping body text '
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> '
>>> 
>>> --------------------------------------------------------------
>>> 
>>> The number of empty lines increases up to hundreds in a single
>>> log
>> message.
>>> 
>>> Actually this depends on the number of new lines being
>>> accumulated so far for the surrounding xml element of the
>>> currently processed one.
>>> 
>>> For example when processing the default global server.xml, on
>>> invocation
>> of
>>> the startElement and stopElement of each inner element
>>> 
>>> the surrounding ‘Server’ element’s accumulated body is being
>>> logged and it consists only of new lines, i.e. no meaningful
>>> content.
>>> 
>>> As the logged information can bring such a large blocks of
>>> empty lines and no valuable information, I’d like to propose
>>> these debug messages to be removed.
>>> 
>>> Can you think of a specific reason to preserve them?
>>> 
>> 
>> I checked that and I think that the log messages can be removed
>> as they do not give any valuable information, only empty rows in
>> the log.

- -1 to remove debug logging. If we want to change it to TRACE, I'm okay
with that.

> 1) What about elements with non-empty bodies? E.g. web.xml.
> 
> I do not believe that it is all only whitespace.
> 
> Are element bodies also logged elsewhere?
> 
> 2) Sometimes people make a mistake misplacing ">"  or forgetting
> ">" and what they expect to be attributes actually happens to be in
> body of an XML element.
> 
> http://markmail.org/message/uvdwl5dm3rwhyyt5
> 
> 3) If someone voluntary turns on debug logging,  one should expect
> to deal with debug information.
> 
> I do not see why that information should be "user-friendly". If 
> someone is interested in debugging that component, it shall just
> dump what you have.

+1

> 4)  One should be able to filter unwanted log messages in 
> java.util.logging. (There exists java.util.logging.Filter
> interface. Somewhere should be useful implementations of it.)

Kind of.

The logging framework provides a great amount of flexibility, but if
the Digester is logging everything, you can't enable TRACE logging for
e.g. web.xml but not for server.xml or any other XML files that the
container processes.

I'm also not sure about how use of the Digester by the web application
might be affected by changing the log level for that class. Things
might change if the application provides a logging.properties and/or
its own copy of the Digester class.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVG/hAAAoJEBzwKT+lPKRYpPYQALlVjwz+U+a8y4IGFi5eYU+k
xXzaLLbD3bE1j5l+g46bOZqfhMBuZp6O6obxNcMta+FcLtsm0uZ31o5XeWFNjZFk
ndkGXPqvW/r6veVIx3y9prwr07wJg88JWnCryflyZvOq7uNCIz3BQUEtYiWKXB0g
kAVhzDWl2ljkn2nHxaiNBVHYPiVAO/+Kiqfxt+feZpOlSYhGJ44b9vxIGbZ2YRsJ
yOr2lpFyvO1CBXQQsW8VIOzfKDqYNMqyjLA5FX65nEV9XvMlXsWPUUyAW9O2TVSs
rpNWxOxRvEY/jlSm/NV0rqp4Gb1Dq3zPuzhFXXMNHvhjNYt2kpNYpDifLoV5/BCb
6rUlVY564DVCq29Hxv6AWXh1n/raYdAh7jOpViSs1WIzoq6b9fcREq/Z0UEH4lDT
zvF5ibIwQkSIR9Ke9YD+4HkauviNQkxu5Wwh99Ue6Jg4ri2EObzVcIXnerZ+7Wos
ulb0GpJHLxnHLgySyBXgDG3MGFXJolenk9bAsqqn2Mj19dIijivcFId6mEMpI4Gw
RUqsdJcP4CStYE8fvk7Kyxwzq29NZo7TTYcuFR07IfTK+ac+NnzbpCEThbf2uopl
mqozge801DDl1LUe7TogJdDhhG5okBGoxUx+6rQMhYSG3ERkOKnSNyy2gv2znggz
nWRM8VTj56z1ERabpnPD
=tHIh
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Excessive number of blank lines being logged in blocks by org.apache.tomcat.util.digester.Digester

Posted by Konstantin Kolinko <kn...@gmail.com>.
2015-04-01 13:31 GMT+03:00 Violeta Georgieva <mi...@gmail.com>:
> Hi,
>
> 2015-03-30 10:27 GMT+03:00 Polina Genova <po...@gmail.com>:
>>
>> Hi,
>>
>>
>>
>> Recently I came across an issue with excessive number of blocks of blank
>> lines being logged in the catalina output logs.
>>
>> This is easily reproducible by simply starting a clean Tomcat 7.0.59
> server
>> with enabled the following logger configuration
>>
>> org.apache.tomcat.util.digester.Digester.level = FINEST
>>
>> The result is enormous catalina log file containing plenty of logs like
> the
>> following:
>>
>> --------------------------------------------------------------
>>
>> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
>> startElement
>>
>> FINE:   Pushing body text '
>>
>>
>>
>>
>>
>>
>>
>>   '
>>
>> Mar 26, 2015 6:12:48 PM org.apache.tomcat.util.digester.Digester
> endElement
>>
>> FINE:   Popping body text '
>>
>>
>>
>>
>>
>>
>>
>>   '
>>
>> --------------------------------------------------------------
>>
>> The number of empty lines increases up to hundreds in a single log
> message.
>>
>> Actually this depends on the number of new lines being accumulated so far
>> for the surrounding xml element of the currently processed one.
>>
>> For example when processing the default global server.xml, on invocation
> of
>> the startElement and stopElement of each inner element
>>
>> the surrounding ‘Server’ element’s accumulated body is being logged and it
>> consists only of new lines, i.e. no meaningful content.
>>
>> As the logged information can bring such a large blocks of empty lines and
>> no valuable information, I’d like to propose these debug messages to be
>> removed.
>>
>> Can you think of a specific reason to preserve them?
>>
>
> I checked that and I think that the log messages can be removed as they do
> not give any valuable information, only empty rows in the log.
>

1) What about elements with non-empty bodies?
E.g. web.xml.

I do not believe that it is all only whitespace.

Are element bodies also logged elsewhere?

2) Sometimes people make a mistake misplacing ">"  or forgetting ">"
and what they expect to be attributes actually happens to be in body
of an XML element.

http://markmail.org/message/uvdwl5dm3rwhyyt5

3) If someone voluntary turns on debug logging,  one should expect to
deal with debug information.

I do not see why that information should be "user-friendly". If
someone is interested in debugging that component, it shall just dump
what you have.

4)  One should be able to filter unwanted log messages in
java.util.logging. (There exists java.util.logging.Filter interface.
Somewhere should be useful implementations of it.)

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org