-----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 >> <miles...@gmail.com>: >>> 2015-04-01 14:30 GMT+03:00 Konstantin Kolinko >>> <knst.koli...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org