kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berryman, Eric" <berry...@frib.msu.edu>
Subject RE: kafka-connect log4j
Date Wed, 11 Jan 2017 14:04:27 GMT

Silly mistake on my part.

Thank you very much for your time!

(I'll submit a pull request as mentioned)



-----Original Message-----
From: Gwen Shapira [mailto:gwen@confluent.io] 
Sent: Wednesday, January 11, 2017 1:25 AM
To: Users <users@kafka.apache.org>
Subject: Re: kafka-connect log4j

btw. It bugs me a bit that Connect logs to console and not to file by default. I think tools
should log to console, but Connect is more of a service / daemon and should log to file like
the brokers do. So when you get your log4j config to work, perhaps submit a PR to Apache Kafka
so we'll all enjoy this? :)

On Tue, Jan 10, 2017 at 10:23 PM, Gwen Shapira <gwen@confluent.io> wrote:
> Is your goal to simply log connect to file rather than to the console?
> In this case your configuration is almost right. Just change the first 
> line in connect-log4j.properties to:
>
> log4j.rootLogger=INFO, stdout, connectAppender
>
> and then add the lines you have in your email.
>
> Or you can get rid of stdout appender completely if you prefer.
>
> You may find the log4j primer useful:
> https://logging.apache.org/log4j/1.2/manual.html
>
> On Tue, Jan 10, 2017 at 7:42 AM, Berryman, Eric <berryman@frib.msu.edu> wrote:
>> Hello!
>>
>> Is there a log4j.appender.connectAppender?
>>
>> I noticed there is a log4j.appender.kafkaAppender.
>> I was hoping to setup the connect-log4j.properties like kafka's.
>>
>> log4j.appender.connectAppender=org.apache.log4j.DailyRollingFileAppen
>> der log4j.appender.connectAppender.DatePattern='.'yyyy-MM-dd-HH
>> log4j.appender.connectAppender.File=${kafka.logs.dir}/connect.log
>> log4j.appender.connectAppender.layout=org.apache.log4j.PatternLayout
>> log4j.appender.connectAppender.layout.ConversionPattern=[%d] %p %m 
>> (%c:%L)%n
>>
>> Thank you!
>> Eric
>
>
>
> --
> Gwen Shapira
> Product Manager | Confluent
> 650.450.2760 | @gwenshap
> Follow us: Twitter | blog



--
Gwen Shapira
Product Manager | Confluent
650.450.2760 | @gwenshap
Follow us: Twitter | blog
Mime
View raw message