Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-410

Change logging behavior to pass exception object to LOG methods

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.6.1
    • None
    • None

    Description

      Throughout the codebase, exceptions are reported by logging e.getStackTrace().toString(). As getStackTrace returns an array and Java's array .toString method just returns the object ID, this means that the stack traces are effectively lost. Instead the exception should be passed to the logger in its original form as the second argument, SLF4J does the right thing with the stack trace.

      This problem was tackled in GORA-230 for AccumuloStore. The attached patch corrects all instances of the problem in the current trunk.

      Attachments

        1. exception_logging.patch
          17 kB
          Gerhard Gossen

        Activity

          gerhard.gossen Gerhard Gossen added a comment -

          Patch for r1660350

          gerhard.gossen Gerhard Gossen added a comment - Patch for r1660350

          commit 65d6c7ac29d2cc041d067e5e7f0857936a7529d7
          Author: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
          Date: Sun Feb 22 13:48:38 2015 -0800

          GORA-410 Change logging behavior to pass exception object to LOG methods

          Thank you very much gerhard.gossen, great patch.

          lewismc Lewis John McGibbney added a comment - commit 65d6c7ac29d2cc041d067e5e7f0857936a7529d7 Author: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov> Date: Sun Feb 22 13:48:38 2015 -0800 GORA-410 Change logging behavior to pass exception object to LOG methods Thank you very much gerhard.gossen , great patch.
          hudson Hudson added a comment -

          SUCCESS: Integrated in gora-trunk #1418 (See https://builds.apache.org/job/gora-trunk/1418/)
          GORA-410 Change logging behavior to pass exception object to LOG methods (lewis.j.mcgibbney: rev 65d6c7ac29d2cc041d067e5e7f0857936a7529d7)

          • gora-core/src/main/java/org/apache/gora/avro/store/AvroStore.java
          • gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java
          • gora-dynamodb/src/main/java/org/apache/gora/dynamodb/store/DynamoDBStore.java
          • CHANGES.txt
          • gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java
          • gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java
          • gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
          • gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java
          • gora-core/src/main/java/org/apache/gora/store/impl/FileBackedDataStoreBase.java
          hudson Hudson added a comment - SUCCESS: Integrated in gora-trunk #1418 (See https://builds.apache.org/job/gora-trunk/1418/ ) GORA-410 Change logging behavior to pass exception object to LOG methods (lewis.j.mcgibbney: rev 65d6c7ac29d2cc041d067e5e7f0857936a7529d7) gora-core/src/main/java/org/apache/gora/avro/store/AvroStore.java gora-core/src/main/java/org/apache/gora/store/impl/DataStoreBase.java gora-dynamodb/src/main/java/org/apache/gora/dynamodb/store/DynamoDBStore.java CHANGES.txt gora-solr/src/main/java/org/apache/gora/solr/store/SolrStore.java gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java gora-core/src/main/java/org/apache/gora/store/impl/FileBackedDataStoreBase.java

          People

            gerhard.gossen Gerhard Gossen
            gerhard.gossen Gerhard Gossen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: