[
https://issues.apache.org/jira/browse/CASSANDRA-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Ellis resolved CASSANDRA-1462.
---------------------------------------
Resolution: Invalid
we seem to be using the logger correctly:
error(Object message, Throwable t)
Log a message object with the ERROR level including the stack trace
of the Throwable t passed as parameter.
> Unexpected exceptions' stacktraces can be lost
> ----------------------------------------------
>
> Key: CASSANDRA-1462
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1462
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.6.5
> Reporter: David King
>
> o.a.c.thrift.Cassandra.login.process has a catch that looks like:
> } catch (Throwable th) {
> LOGGER.error("Internal error processing login", th);
> TApplicationException x = new
> TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error
> processing login");
> oprot.writeMessageBegin(new TMessage("login",
> TMessageType.EXCEPTION, seqid));
> x.write(oprot);
> oprot.writeMessageEnd();
> oprot.getTransport().flush();
> return;
> }
> Unfortunately this loses vital debugging information as it loses the stack
> trace associated with the exception. In particular it made tracking down the
> source of this very difficult:
> ERROR [pool-1-thread-9723] 2010-09-03 12:34:16,978 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9556] 2010-09-03 12:34:17,031 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9556] 2010-09-03 12:34:17,129 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,190 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,245 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,285 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> ERROR [pool-1-thread-9794] 2010-09-03 12:34:17,392 Cassandra.java (line 1659)
> Internal error processing batch_mutate
> java.lang.NullPointerException
> I'd like to file a bug for that one too, but I have no idea what caused it :)
> For reference, my log4j.properties:
> log4j.rootLogger=INFO,stdout,R
> # stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} %m%n
> # rolling log file
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.file.maxFileSize=20MB
> log4j.appender.file.maxBackupIndex=50
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L)
> %m%n
> # Edit the next line to point to your logs directory
> log4j.appender.R.File=/cassandra/log/system.log
> # Application logging options
> #log4j.logger.com.facebook=DEBUG
> #log4j.logger.com.facebook.infrastructure.gms=DEBUG
> #log4j.logger.com.facebook.infrastructure.db=DEBUG
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.