Re: Regarding files generated by "JJTree"
Dear Martin, Mark, Konstantin and dev team, I highly appreciate you inputs and time. Its a great help for my project. Thank You Sangeeta On Fri, May 20, 2016 at 5:38 PM, Konstantin Kolinko wrote: > 2016-05-20 13:01 GMT+03:00 sangeeta lal : > > Dear Sir, > > > > *Thanks for your reply!* > > > > Could you please tell me, if there is any listing about all the auto- > > generated files. I have manually identified 59 files in the folder " > > *tomcat\java\org\apache\el\parser*" which are auto generated. > > ELParser.jjt is the source. > > ELParser.java was generated. > Some helper classes (Node.java, SimpleNode.java, ..) are generated / > provided by the tool. > > The Ast* files - a stub was generated, but the rest is written by a > human developer. > > ELParser.html is a report from generation tool. > > > Java CC site has a manual, with examples. > https://javacc.java.net/doc/docindex.html > https://javacc.java.net/doc/JJTree.html > > In short, JavaCC is a lexical parser that can perform some Java code > when some lexical element is encountered. Coupling it with JJTree > turns that Java code into code that produces a tree of Node elements. > > The behaviour of those nodes it then programmed by a human. My > understanding is that by default those Ast classes have only a > constructor, but no other methods. Some methods are declared in > SimpleNode class and can be overridden in specific classes, e.g. > AstIdentifier overrides setImage(). > > Some of default classes were edited by adding additional methods. E.g. > methods with an EvaluationContext argument in SimpleNode class were > added. > > > > I have following two questions: > > > > 1. Can tomcat project have auto-generated files in some other folder > also? > > 2. Is the "JavaCC" only tool which is used to auto-generate the files ? > or > > there are some other tools as well? > > > > There are some classes from other projects that are preprocessed (by > renaming the packages) and recompiled. > > All versions of Tomcat do so for Apache Commons Logging library when > it is built as an "extras" package. > > See textual replacement, with > > dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/main/java/org/apache/commons" > encoding="ISO-8859-1"> >value="org.apache.juli" /> > > > > > Older versions of Tomcat also did so for Apache Commons Pool and > Apache Commons DBCP libraries, but Tomcat 8.0 and later has an own > copy of those libraries in it source tree. > > > This is about *.java files. There is also documentation (xml -> html), > javadoc (java -> html). > > > The mailing list rules: > http://tomcat.apache.org/lists.html#tomcat-users > -> 6. Top-posting is bad. > > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Regarding files generated by "JJTree"
Dear Sir, *Thanks for your reply!* Could you please tell me, if there is any listing about all the auto- generated files. I have manually identified 59 files in the folder " *tomcat\java\org\apache\el\parser*" which are auto generated. I have following two questions: 1. Can tomcat project have auto-generated files in some other folder also? 2. Is the "JavaCC" only tool which is used to auto-generate the files ? or there are some other tools as well? I highly *appreciate your help* and time! Thank You Sangeeta On Fri, May 20, 2016 at 3:14 PM, Martin Grigorov wrote: > Hello Sangeeta, > > Yes, those files are auto-generated by a tool: https://javacc.java.net/. > > > On Fri, May 20, 2016 at 11:41 AM, sangeeta lal > wrote: > > > Dear Dev Team, > > > > Can anyone please give me little information about these files? > > > > Thank You > > > > On Thu, May 19, 2016 at 8:22 PM, sangeeta lal > > wrote: > > > > > > > > Dear Dev Team, > > > > > > > > > I am Sangeeta. I am a PhD Scholar in the area of automated software > > > engineering. I am currently studying source code of Apache Tomcat > > project. > > > While studying the source code. I noticed a folder in Apache Tomcat > > project > > > consisting of 58 files having following line written in them: > > > > > > > > > "/* *Generated By:JJTree: Do not edit this line. > AstLambdaExpression.java > > > Version 4.3 */"* > > > > > > > > > Can anyone please explain me little about the meaning of this line? Are > > > all such files generated by this tool have no contribution from the > > human > > > developers? > > > > > > I highly appreciate your help! > > > > > > Thanks You > > > Sangeeta > > > > > > -- > > > Regards... > > > Sangeeta > > > Assistant Professor > > > CSE Department @JIIT Noida > > > > > > > > > > > > -- > > Regards... > > Sangeeta > > Assistant Professor > > CSE Department @JIIT Noida > > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Regarding files generated by "JJTree"
Dear Dev Team, Can anyone please give me little information about these files? Thank You On Thu, May 19, 2016 at 8:22 PM, sangeeta lal wrote: > > Dear Dev Team, > > > I am Sangeeta. I am a PhD Scholar in the area of automated software > engineering. I am currently studying source code of Apache Tomcat project. > While studying the source code. I noticed a folder in Apache Tomcat project > consisting of 58 files having following line written in them: > > > "/* *Generated By:JJTree: Do not edit this line. AstLambdaExpression.java > Version 4.3 */"* > > > Can anyone please explain me little about the meaning of this line? Are > all such files generated by this tool have no contribution from the human > developers? > > I highly appreciate your help! > > Thanks You > Sangeeta > > -- > Regards... > Sangeeta > Assistant Professor > CSE Department @JIIT Noida > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Regarding files generated by "JJTree"
Dear Dev Team, I am Sangeeta. I am a PhD Scholar in the area of automated software engineering. I am currently studying source code of Apache Tomcat project. While studying the source code. I noticed a folder in Apache Tomcat project consisting of 58 files having following line written in them: "/* *Generated By:JJTree: Do not edit this line. AstLambdaExpression.java Version 4.3 */"* Can anyone please explain me little about the meaning of this line? Are all such files generated by this tool have no contribution from the human developers? I highly appreciate your help! Thanks You Sangeeta -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Regarding Logging Statements in Apache Tomcat
Dear Noga and Dev Team, Thanks! for the link !! :-) On Sun, Mar 6, 2016 at 11:55 PM, Noga wrote: > Take a look around here. > https://javacc.java.net > > -- Noga > > > On Sun, Mar 6, 2016 at 9:42 PM, sangeeta lal > wrote: > > > Dear Dev Team, > > > > In addition to this I found that first line of ELParser.java consist of > > line: > > > > * "/* Generated By:JJTree&JavaCC: Do not edit this line. ELParser.java > */* > > ". > > > > Does that mean that this file is automatically generated by some tool? > > > > Thanks for your help! > > > > > > On Sun, Mar 6, 2016 at 7:44 PM, sangeeta lal > > wrote: > > > > > Dear Dev Team, > > > > > > I am Sangeeta, I am a PhD scholar and faculty working in India. > > > > > > I am working on analysing logging statements in Apache Tomcat. I have > > > found three files in Apache Tomcat. The first two files have large > number > > > of logging statements while the 3rd file does not consists of any > logging > > > statement. Is there any specific reason for this? > > > > > > Following are the details of the files: > > > > > > > > > 1. RequestDumperFilter.java [Log statements = 43] > > > 2. WebappClassLoader.java [Log statements = 91] > > > 3. ELParser.java[Log statements = 0] > > > > > > Thank You > > > > > > -- > > > Regards... > > > Sangeeta > > > Assistant Professor > > > CSE Department @JIIT Noida > > > > > > > > > > > > -- > > Regards... > > Sangeeta > > Assistant Professor > > CSE Department @JIIT Noida > > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Regarding Logging Statements in Apache Tomcat
Dear Dev Team, In addition to this I found that first line of ELParser.java consist of line: * "/* Generated By:JJTree&JavaCC: Do not edit this line. ELParser.java */* ". Does that mean that this file is automatically generated by some tool? Thanks for your help! On Sun, Mar 6, 2016 at 7:44 PM, sangeeta lal wrote: > Dear Dev Team, > > I am Sangeeta, I am a PhD scholar and faculty working in India. > > I am working on analysing logging statements in Apache Tomcat. I have > found three files in Apache Tomcat. The first two files have large number > of logging statements while the 3rd file does not consists of any logging > statement. Is there any specific reason for this? > > Following are the details of the files: > > > 1. RequestDumperFilter.java [Log statements = 43] > 2. WebappClassLoader.java [Log statements = 91] > 3. ELParser.java[Log statements = 0] > > Thank You > > -- > Regards... > Sangeeta > Assistant Professor > CSE Department @JIIT Noida > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Regarding Logging Statements in Apache Tomcat
Dear Dev Team, I am Sangeeta, I am a PhD scholar and faculty working in India. I am working on analysing logging statements in Apache Tomcat. I have found three files in Apache Tomcat. The first two files have large number of logging statements while the 3rd file does not consists of any logging statement. Is there any specific reason for this? Following are the details of the files: 1. RequestDumperFilter.java [Log statements = 43] 2. WebappClassLoader.java [Log statements = 91] 3. ELParser.java[Log statements = 0] Thank You -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Too few fatal log ststements
Dear Team, I have one query. There are different logging levels in tomcat. Does it matters alot to use right log level? I mean as a researcher I am exploring in which scenarios one should be extremely careful to use right log level. Can anyone of please throw more light on this topic. Thank You On Tue, Aug 12, 2014 at 9:04 AM, sangeeta lal wrote: > Thanks! All of you :) Now I have much more understanding about tomcat > logging. > > Thanks a lot! > > > On Mon, Aug 11, 2014 at 7:26 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > >> Sangeeta, >> >> On 8/11/14, 5:41 AM, sangeeta lal wrote: >> > Actually I have data for other log levels also. Debug =600 statements, >> > error=400 statements, trace =90 statements etc. >> >> I would usually expect in a typical project that there would be more >> TRACE logging statements than anything else. On the other hand, DEBUG >> tends to be the default log level used by most developers that I observe. >> >> There are likely many DEBUG statements in Tomcat's code that perhaps >> should be TRACE statements. >> >> 400 ERROR versus 600 DEBUG seems like an awfully large number of ERROR >> statements, but that may simply be evidence that most errors are >> properly-logged while there is less DEBUG logging than average. >> >> > I am just curious, what could be the possible reason for having such few >> > "fatal" statements. Can you give your opinion about this? >> >> There aren't too many things that ate truly /fatal/ to Tomcat. If we can >> read config files, mostly everything is okay. One might consider that >> failing to bind to a port is a fatal error, but Tomcat can start up >> "successfully" even if no connectors can start properly. This is because >> connectors can be configured on the fly, etc. and, in embedded contexts, >> the state of the container can change from within and therefore zero >> live connectors is no cause for alarm. >> >> Most errors don't take-down the container/JVM, so they aren't considered >> fatal. >> >> I wouldn't expect to see very many FATAL log messages in any product, >> really: the truly fatal things happen at the JVM level and would end up >> emitting a message to stdout and possibly bringing-down the JVM entirely >> (e.g. segmentation fault). >> >> If you have some /suggestions/ for what conditions might be fatal, we >> might be able to comment on those specifically. But, we aren't going to >> re-evaluate every component in Tomcat for logging to satisfy your >> academic curiosity about logging practices in the Tomcat source. >> >> -chris >> >> > > > -- > Regards... > Sangeeta > Assistant Professor > CSE Department @JIIT Noida > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Too few fatal log ststements
Thanks! All of you :) Now I have much more understanding about tomcat logging. Thanks a lot! On Mon, Aug 11, 2014 at 7:26 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > Sangeeta, > > On 8/11/14, 5:41 AM, sangeeta lal wrote: > > Actually I have data for other log levels also. Debug =600 statements, > > error=400 statements, trace =90 statements etc. > > I would usually expect in a typical project that there would be more > TRACE logging statements than anything else. On the other hand, DEBUG > tends to be the default log level used by most developers that I observe. > > There are likely many DEBUG statements in Tomcat's code that perhaps > should be TRACE statements. > > 400 ERROR versus 600 DEBUG seems like an awfully large number of ERROR > statements, but that may simply be evidence that most errors are > properly-logged while there is less DEBUG logging than average. > > > I am just curious, what could be the possible reason for having such few > > "fatal" statements. Can you give your opinion about this? > > There aren't too many things that ate truly /fatal/ to Tomcat. If we can > read config files, mostly everything is okay. One might consider that > failing to bind to a port is a fatal error, but Tomcat can start up > "successfully" even if no connectors can start properly. This is because > connectors can be configured on the fly, etc. and, in embedded contexts, > the state of the container can change from within and therefore zero > live connectors is no cause for alarm. > > Most errors don't take-down the container/JVM, so they aren't considered > fatal. > > I wouldn't expect to see very many FATAL log messages in any product, > really: the truly fatal things happen at the JVM level and would end up > emitting a message to stdout and possibly bringing-down the JVM entirely > (e.g. segmentation fault). > > If you have some /suggestions/ for what conditions might be fatal, we > might be able to comment on those specifically. But, we aren't going to > re-evaluate every component in Tomcat for logging to satisfy your > academic curiosity about logging practices in the Tomcat source. > > -chris > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Too few fatal log ststements
Okay! This means its because of requirement specification of Tomcat. On Mon, Aug 11, 2014 at 3:15 PM, Leon Rosenberg wrote: > maybe tomcat is just so robust, that nothing is fatal to it ;-) > Leon > > > On Mon, Aug 11, 2014 at 11:41 AM, sangeeta lal > wrote: > > > Hi Mark, > > > > Actually I have data for other log levels also. Debug =600 statements, > > error=400 statements, trace =90 statements etc. > > > > I am just curious, what could be the possible reason for having such few > > "fatal" statements. Can you give your opinion about this? > > > > Thanks! for reply. > > > > > > On Mon, Aug 11, 2014 at 3:06 PM, Mark Thomas wrote: > > > > > On 11/08/2014 09:14, sangeeta lal wrote: > > > > Hello Team, > > > > > > > > > > > > I am sangeeta PhD scholar and Researcher working in the are of mining > > > > software repositories. > > > > > > > > Currently I am working on the *tomcat *platform. I am parsing the > code > > of > > > > tomcat (version 8) and I discovered that there are only *"10-11" > > > log.fatal > > > > statement.* > > > > > > > > I am just curious, is it normal? > > > > > > That depends on your definition of normal. > > > > > > > and why is it so? > > > > > > Because that this how the Tomcat developers wrote the code. > > > > > > > Why there so few*log.fatal *statements? > > > > > > That questions assumes that Tomcat has fewer than the normal number of > > > fatal log statements. As per my comment above, that depends on how > > > normal is defined. > > > > > > Mark > > > > > > - > > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > > > > > > > > > > -- > > Regards... > > Sangeeta > > Assistant Professor > > CSE Department @JIIT Noida > > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Too few fatal log ststements
Hi Mark, Actually I have data for other log levels also. Debug =600 statements, error=400 statements, trace =90 statements etc. I am just curious, what could be the possible reason for having such few "fatal" statements. Can you give your opinion about this? Thanks! for reply. On Mon, Aug 11, 2014 at 3:06 PM, Mark Thomas wrote: > On 11/08/2014 09:14, sangeeta lal wrote: > > Hello Team, > > > > > > I am sangeeta PhD scholar and Researcher working in the are of mining > > software repositories. > > > > Currently I am working on the *tomcat *platform. I am parsing the code of > > tomcat (version 8) and I discovered that there are only *"10-11" > log.fatal > > statement.* > > > > I am just curious, is it normal? > > That depends on your definition of normal. > > > and why is it so? > > Because that this how the Tomcat developers wrote the code. > > > Why there so few*log.fatal *statements? > > That questions assumes that Tomcat has fewer than the normal number of > fatal log statements. As per my comment above, that depends on how > normal is defined. > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Too few fatal log ststements
Hello Team, I am sangeeta PhD scholar and Researcher working in the are of mining software repositories. Currently I am working on the *tomcat *platform. I am parsing the code of tomcat (version 8) and I discovered that there are only *"10-11" log.fatal statement.* I am just curious, is it normal? and why is it so? Why there so few*log.fatal *statements? Thanks! -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Re: Application Logging Practices in Industrial and Open-Source Software
Thank you so much for taking out your time and responding to the survey. On Mon, Jul 21, 2014 at 9:55 AM, sangeeta lal wrote: > Dear Tomcat Team, > > *Application Logging Practices in Industrial and Open-Source Software* > > > I am a PhD scholar at a state university at India working in the area of > mining software repositories and empirical software engineering. I am > currently working on a project to study developer logging practices in > industrial and open-source software. Following is a link to a short survey > (*about > 1 minute to complete*). Your response will be highly appreciated. Thanks > in advance. > > > > Link to survey: https://www.surveymonkey.com/s/Y83L23M > > Thank You > -- > Regards... > Sangeeta > Assistant Professor > CSE Department @JIIT Noida > -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida
Application Logging Practices in Industrial and Open-Source Software
Dear Tomcat Team, *Application Logging Practices in Industrial and Open-Source Software* I am a PhD scholar at a state university at India working in the area of mining software repositories and empirical software engineering. I am currently working on a project to study developer logging practices in industrial and open-source software. Following is a link to a short survey (*about 1 minute to complete*). Your response will be highly appreciated. Thanks in advance. Link to survey: https://www.surveymonkey.com/s/Y83L23M Thank You -- Regards... Sangeeta Assistant Professor CSE Department @JIIT Noida