Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7.1
    • Component/s: core
    • Labels:

      Description

      The log4j appender has the following class definition in it:

      class DefaultStringEncoder extends Encoder[LoggingEvent]

      { override def toMessage(event: LoggingEvent):Message = new Message(event.getMessage.asInstanceOf[String].getBytes) }

      This left over and no longer used. The current version uses kafka.serializer.StringEncoder as the default encoder.

        Activity

        Hide
        Jose Quinteiro added a comment -

        Index: core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala
        ===================================================================
        — core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala (revision 1300634)
        +++ core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala (working copy)
        @@ -93,8 +93,4 @@
        }

        override def requiresLayout: Boolean = false
        -}
        -
        -class DefaultStringEncoder extends Encoder[LoggingEvent]

        { - override def toMessage(event: LoggingEvent):Message = new Message(event.getMessage.asInstanceOf[String].getBytes) -}

        +}

        Show
        Jose Quinteiro added a comment - Index: core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala =================================================================== — core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala (revision 1300634) +++ core/src/main/scala/kafka/producer/KafkaLog4jAppender.scala (working copy) @@ -93,8 +93,4 @@ } override def requiresLayout: Boolean = false -} - -class DefaultStringEncoder extends Encoder [LoggingEvent] { - override def toMessage(event: LoggingEvent):Message = new Message(event.getMessage.asInstanceOf[String].getBytes) -} +}
        Hide
        Jun Rao added a comment -

        Jose,

        Thanks for the patch. Just committed to trunk.

        Show
        Jun Rao added a comment - Jose, Thanks for the patch. Just committed to trunk.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jose Quinteiro
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development