Sounds like https://issues.apache.org/jira/browse/KAFKA-1788 maybe
On Feb 24, 2015 2:28 PM, "Scott Chapman" <sc...@woofplanet.com> wrote:

> Yea, however I don't get async behavior. When kafka is down the log blocks,
> which is kinda nasty to my app.
>
> On Tue Feb 24 2015 at 2:27:09 PM Joe Stein <joe.st...@stealth.ly> wrote:
>
> > Producer type isn't needed anymore with the new producer so in the the
> > logger properties just leave that out in 0.8.2 and it should work.
> >
> > On Tue, Feb 24, 2015 at 2:24 PM, Joe Stein <joe.st...@stealth.ly> wrote:
> >
> > > Interesting, looks like a breaking change from 0.8.1
> > > https://github.com/apache/kafka/blob/0.8.1/core/src/
> > main/scala/kafka/producer/KafkaLog4jAppender.scala
> > > to 0.8.2
> > > https://github.com/apache/kafka/blob/0.8.2/core/src/
> > main/scala/kafka/producer/KafkaLog4jAppender.scala
> > >
> > > On Tue, Feb 24, 2015 at 2:21 PM, Joe Stein <joe.st...@stealth.ly>
> wrote:
> > >
> > >> and kafka too :)
> > >>
> > >> On Tue, Feb 24, 2015 at 2:21 PM, Joe Stein <joe.st...@stealth.ly>
> > wrote:
> > >>
> > >>> are you including
> > >>>
> https://github.com/stealthly/scala-kafka/blob/master/build.gradle#L122
> > >>> in your project?
> > >>>
> > >>> ~ Joe Stein
> > >>> - - - - - - - - - - - - - - - - -
> > >>>
> > >>>   http://www.stealth.ly
> > >>> - - - - - - - - - - - - - - - - -
> > >>>
> > >>> On Tue, Feb 24, 2015 at 2:02 PM, Scott Chapman <sc...@woofplanet.com
> >
> > >>> wrote:
> > >>>
> > >>>> Yea, when I try to set type to async (exactly like the example) I
> get:
> > >>>> log4j:WARN No such property [producerType] in
> > >>>> kafka.producer.KafkaLog4jAppender.
> > >>>>
> > >>>> On Tue Feb 24 2015 at 1:35:54 PM Joe Stein <joe.st...@stealth.ly>
> > >>>> wrote:
> > >>>>
> > >>>> > Here is sample log4j.properties
> > >>>> > https://github.com/stealthly/scala-kafka/blob/master/src/tes
> > >>>> > t/resources/log4j.properties#L54-L67
> > >>>> >
> > >>>> > I _almost_ have always pulled the class
> > >>>> > https://github.com/apache/kafka/blob/0.8.2/core/src/main/
> > >>>> > scala/kafka/producer/KafkaLog4jAppender.scala
> > >>>> > internal
> > >>>> > to private repo and changed it as things came up... e.g.
> > setSource(),
> > >>>> > setTags() blah blah...
> > >>>> >
> > >>>> > Paul Otto has an open source version
> > >>>> > https://github.com/potto007/kafka-appender-layout that you could
> > try
> > >>>> out
> > >>>> > too that he built to tackle some of the layout things.
> > >>>> >
> > >>>> > ~ Joe Stein
> > >>>> > - - - - - - - - - - - - - - - - -
> > >>>> >
> > >>>> >   http://www.stealth.ly
> > >>>> > - - - - - - - - - - - - - - - - -
> > >>>> >
> > >>>> > On Mon, Feb 23, 2015 at 4:42 PM, Alex Melville <
> amelvi...@g.hmc.edu
> > >
> > >>>> > wrote:
> > >>>> >
> > >>>> > > ^^ I would really appreciate this as well. It's unclear how to
> get
> > >>>> log4j
> > >>>> > > working with Kafka when you have no prior experience with log4j.
> > >>>> > >
> > >>>> > > On Mon, Feb 23, 2015 at 4:39 AM, Scott Chapman <
> > >>>> sc...@woofplanet.com>
> > >>>> > > wrote:
> > >>>> > >
> > >>>> > > > Thanks. But we're using log4j. I tried setting the type to
> async
> > >>>> but it
> > >>>> > > > generated a warning of no such field. Is there any real
> > >>>> documentation
> > >>>> > on
> > >>>> > > > the log4j appender?
> > >>>> > > >
> > >>>> > > > On Mon Feb 23 2015 at 2:58:54 AM Steven Schlansker <
> > >>>> > > > sschlans...@opentable.com> wrote:
> > >>>> > > >
> > >>>> > > > > We just configure our logback.xml to have two Appenders, an
> > >>>> > > AsyncAppender
> > >>>> > > > > -> KafkaAppender, and FileAppender (or ConsoleAppender as
> > >>>> > appropriate).
> > >>>> > > > >
> > >>>> > > > > AsyncAppender removes more failure cases too, e.g. a health
> > >>>> check
> > >>>> > > hanging
> > >>>> > > > > rather than returning rapidly could block you application.
> > >>>> > > > >
> > >>>> > > > > On Feb 22, 2015, at 11:26 PM, anthony musyoki <
> > >>>> > > anthony.musy...@gmail.com
> > >>>> > > > >
> > >>>> > > > > wrote:
> > >>>> > > > >
> > >>>> > > > > > Theres also another one here.
> > >>>> > > > > >
> > >>>> > > > > > https://github.com/danielwegener/logback-kafka-appender.
> > >>>> > > > > >
> > >>>> > > > > > It has a fallback appender which might address the issue
> of
> > >>>> Kafka
> > >>>> > > being
> > >>>> > > > > > un-available.
> > >>>> > > > > >
> > >>>> > > > > >
> > >>>> > > > > > On Mon, Feb 23, 2015 at 9:45 AM, Steven Schlansker <
> > >>>> > > > > > sschlans...@opentable.com> wrote:
> > >>>> > > > > >
> > >>>> > > > > >> Here’s my attempt at a Logback version, should be fairly
> > >>>> easily
> > >>>> > > > ported:
> > >>>> > > > > >>
> > >>>> > > > > >> https://github.com/opentable/
> > otj-logging/blob/master/kafka/
> > >>>> > > > > src/main/java/com/opentable/logging/KafkaAppender.java
> > >>>> > > > > >>
> > >>>> > > > > >> On Feb 22, 2015, at 1:36 PM, Scott Chapman <
> > >>>> sc...@woofplanet.com>
> > >>>> > > > > wrote:
> > >>>> > > > > >>
> > >>>> > > > > >>> I am just starting to use it and could use a little
> > >>>> guidance. I
> > >>>> > was
> > >>>> > > > > able
> > >>>> > > > > >> to
> > >>>> > > > > >>> get it working with 0.8.2 but am not clear on best
> > >>>> practices for
> > >>>> > > > using
> > >>>> > > > > >> it.
> > >>>> > > > > >>>
> > >>>> > > > > >>> Anyway willing to help me out a bit? Got a few
> questions,
> > >>>> like
> > >>>> > how
> > >>>> > > to
> > >>>> > > > > >>> protect applications from when kafka is down or
> > unreachable.
> > >>>> > > > > >>>
> > >>>> > > > > >>> It seems like a great idea for being able to get logs
> from
> > >>>> > existing
> > >>>> > > > > >>> applications to be collected by kafka.
> > >>>> > > > > >>>
> > >>>> > > > > >>> Thanks in advance!
> > >>>> > > > > >>
> > >>>> > > > > >>
> > >>>> > > > >
> > >>>> > > > >
> > >>>> > > >
> > >>>> > >
> > >>>> >
> > >>>>
> > >>>
> > >>>
> > >>
> > >
> >
>

Reply via email to