-----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 <miles...@gmail.com>: >> Hi, >> >> 2015-03-30 10:27 GMT+03:00 Polina Genova >> <polina.gen...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org