cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Brown (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8379) Remove filename and line number flags from default logging configuration
Date Wed, 26 Nov 2014 19:57:12 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Brown updated CASSANDRA-8379:
----------------------------------
    Attachment: cassandra-2.0-8379.txt

> 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)

Mime
View raw message