[JIRA] Created: (LBCLASSIC-325) Filtering out selected stack trace frames

Filtering out selected stack trace frames ----------------------------------------- Key: LBCLASSIC-325 URL: http://jira.qos.ch/browse/LBCLASSIC-325 Project: logback-classic Issue Type: New Feature Components: appender, layout Reporter: Tomasz Nurkiewicz Assignee: Logback dev list Priority: Minor Many frameworks and libraries like Spring or EJB are introducing hundreds of synthetic method invocations (AOP, dynamic proxies, CGLIB-generated classes, etc.) They are irrelevant for most of the time and only cluttering the stack traces printed by Logback. It would be nice to have possibility to filter (possibly by providing a set of patterns in logback.xml) each stack trace line and skip selected ones. Similar feature is implemented in some IDEs, see: http://blogs.jetbrains.com/idea/2010/07/console-folding-customization. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-325?page=com.atlassian.jira.plugin.syste... ] Tomasz Nurkiewicz commented on LBCLASSIC-325: --------------------------------------------- I created a small proof-of-concept: https://github.com/nurkiewicz/logback/tree/LBCLASSIC-325 and wrote a little bit more about the problem: http://nurkiewicz.blogspot.com/2012/03/filtering-irrelevant-stack-trace-line....
Filtering out selected stack trace frames -----------------------------------------
Key: LBCLASSIC-325 URL: http://jira.qos.ch/browse/LBCLASSIC-325 Project: logback-classic Issue Type: New Feature Components: appender, layout Reporter: Tomasz Nurkiewicz Assignee: Logback dev list Priority: Minor
Many frameworks and libraries like Spring or EJB are introducing hundreds of synthetic method invocations (AOP, dynamic proxies, CGLIB-generated classes, etc.) They are irrelevant for most of the time and only cluttering the stack traces printed by Logback. It would be nice to have possibility to filter (possibly by providing a set of patterns in logback.xml) each stack trace line and skip selected ones. Similar feature is implemented in some IDEs, see: http://blogs.jetbrains.com/idea/2010/07/console-folding-customization.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-325?page=com.atlassian.jira.plugin.syste... ] Nick Spacek commented on LBCLASSIC-325: --------------------------------------- I like the idea, but I don't like the thought of cluttering the <pattern> with it. Is there any other way we could place a filter on the text output by the logger?
Filtering out selected stack trace frames -----------------------------------------
Key: LBCLASSIC-325 URL: http://jira.qos.ch/browse/LBCLASSIC-325 Project: logback-classic Issue Type: New Feature Components: appender, layout Reporter: Tomasz Nurkiewicz Assignee: Logback dev list Priority: Minor
Many frameworks and libraries like Spring or EJB are introducing hundreds of synthetic method invocations (AOP, dynamic proxies, CGLIB-generated classes, etc.) They are irrelevant for most of the time and only cluttering the stack traces printed by Logback. It would be nice to have possibility to filter (possibly by providing a set of patterns in logback.xml) each stack trace line and skip selected ones. Similar feature is implemented in some IDEs, see: http://blogs.jetbrains.com/idea/2010/07/console-folding-customization.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-325?page=com.atlassian.jira.plugin.syste... ] Przemysław Pokrywka commented on LBCLASSIC-325: ----------------------------------------------- Very good idea. One more improvement to it would be an ability to INCLUDE "border" lines from ignored packages. By border lines I mean the lines adjacent to relevant lines. They are often useful, as you can see the places, where your code interacts with a framework or gets called by it. An option to include the border lines would further improve this feature.
Filtering out selected stack trace frames -----------------------------------------
Key: LBCLASSIC-325 URL: http://jira.qos.ch/browse/LBCLASSIC-325 Project: logback-classic Issue Type: New Feature Components: appender, layout Reporter: Tomasz Nurkiewicz Assignee: Logback dev list Priority: Minor
Many frameworks and libraries like Spring or EJB are introducing hundreds of synthetic method invocations (AOP, dynamic proxies, CGLIB-generated classes, etc.) They are irrelevant for most of the time and only cluttering the stack traces printed by Logback. It would be nice to have possibility to filter (possibly by providing a set of patterns in logback.xml) each stack trace line and skip selected ones. Similar feature is implemented in some IDEs, see: http://blogs.jetbrains.com/idea/2010/07/console-folding-customization.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-325?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-325: -------------------------------------- Hi Tomasz, Thank you for yet another cool contribution to the project. Contrary to folder customizations in IDEA, in the case of logback removed stack trace lines cannot be "unremoved" whereas in IDEA they can be unfolded. There must a way to signal to the user which sort (which package) of lines were removed. Thus, it seems to me that Przemysław's remark about border lines becomes particularly relevant in our context. As for Nick's remark about cluttering the pattern, we could use properties and re-use the masked packages. For example, we could write <property name="mask" value="java.lang.reflect.Method, org.apache.catalina, org.springframework.aop, org.springframework.security, org.springframework.transaction, org.springframework.web, sun.reflect, net.sf.cglib"/> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d %level %thread %logger{1} | %m%n%rEx{full, ${mask}}</pattern> </encoder> .... </appender> Note that the mask property could be defined in a file as well.
Filtering out selected stack trace frames -----------------------------------------
Key: LBCLASSIC-325 URL: http://jira.qos.ch/browse/LBCLASSIC-325 Project: logback-classic Issue Type: New Feature Components: appender, layout Reporter: Tomasz Nurkiewicz Assignee: Logback dev list Priority: Minor
Many frameworks and libraries like Spring or EJB are introducing hundreds of synthetic method invocations (AOP, dynamic proxies, CGLIB-generated classes, etc.) They are irrelevant for most of the time and only cluttering the stack traces printed by Logback. It would be nice to have possibility to filter (possibly by providing a set of patterns in logback.xml) each stack trace line and skip selected ones. Similar feature is implemented in some IDEs, see: http://blogs.jetbrains.com/idea/2010/07/console-folding-customization.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira


participants (6)
-
Alexander Czar (JIRA)
-
Ceki Gulcu (JIRA)
-
Leif Warner (JIRA)
-
Nick Spacek (JIRA)
-
Przemysław Pokrywka (JIRA)
-
Tomasz Nurkiewicz (JIRA)