[ https://issues.apache.org/jira/browse/CASSANDRA-8379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14227046#comment-14227046 ]
Chris Lohfink commented on CASSANDRA-8379: ------------------------------------------ Is there really so many logging events that this is slowing anything down? There really isnt any in the read/write path unless logging turned up. There are a number of issues I have only been able to figure out due to the class/line numbers. Cost of maintainability is pretty high imho unless benchmarks show some significant improvements. > Remove filename and line number flags from default logging configuration > ------------------------------------------------------------------------ > > Key: CASSANDRA-8379 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8379 > Project: Cassandra > Issue Type: Improvement > Reporter: Matt Brown > Priority: Minor > Fix For: 2.1.3 > > Attachments: cassandra-2.0-8379.txt, trunk-8379.txt > > > n the logging configuration that ships with the cassandra distribution > (log4j-server.properties in 2.0, and logback.xml in 2.1), the rolling file > appender is configured to print the file name and the line number of each > logging event: > {code}log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line > %L) %m%n{code} > Both the log4j and logback documentation warn that generating the > filename/line information is not a cheap operation. > From the [log4j > docs|http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html]: > > WARNING Generating caller location information is extremely slow and should > > be avoided unless execution speed is not an issue. > From [logback docs|http://logback.qos.ch/manual/layouts.html]: > > Generating the file information is not particularly fast. Thus, its use > > should be avoided unless execution speed is not an issue. > The implementation for both involves creating a new Throwable and then > printing the stack trace for the throwable to find the file name or line > number. I don't have data to back this up but the conventional advice that > "throwing exceptions is slow" has to do with filling in the stacktrace. > It would make more sense for the logging configuration to simply use the > logger/category name (%c) instead of the file name and to remove the line > number part. -- This message was sent by Atlassian JIRA (v6.3.4#6332)