You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "hsy541@gmail.com" <hs...@gmail.com> on 2014/11/14 01:58:10 UTC

log4j dir?

Hi guys,

Just notice kafka.logs.dir in log4j.properties doesn't take effect

It's always set to *$base_dir/logs* in kafka-run-class.sh

LOG_DIR=$base_dir/logs
KAFKA_LOG4J_OPTS="-Dkafka.logs.dir=$LOG_DIR $KAFKA_LOG4J_OPTS"

Best,
Siyuan

Re: log4j dir?

Posted by "hsy541@gmail.com" <hs...@gmail.com>.
I think there is no way to specify different log location without modifying
shell script.
The *kafka.**logs.dir* in log4j.properties file is misleading

On Fri, Nov 14, 2014 at 1:24 PM, Ben Drees <be...@gmail.com> wrote:

> Hi,
>
> I had trouble with this as well.  The version of Kafka I'm running insists
> on using 'kafka/logs', so I create a soft link from there to the desired
> destination directory:
>
> # kafka scripts hard-code the logs dir, so point that path to where we want
> the logs to be.
> ln -s $STREAM_BUFFER_LOGS_DIR kafka/logs
>
> -Ben
>
>
> On Fri, Nov 14, 2014 at 11:17 AM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > Anyone has any idea how do I config the log4j file dir?
> >
> > On Thu, Nov 13, 2014 at 4:58 PM, hsy541@gmail.com <hs...@gmail.com>
> > wrote:
> >
> > > Hi guys,
> > >
> > > Just notice kafka.logs.dir in log4j.properties doesn't take effect
> > >
> > > It's always set to *$base_dir/logs* in kafka-run-class.sh
> > >
> > > LOG_DIR=$base_dir/logs
> > > KAFKA_LOG4J_OPTS="-Dkafka.logs.dir=$LOG_DIR $KAFKA_LOG4J_OPTS"
> > >
> > > Best,
> > > Siyuan
> > >
> >
>

Re: log4j dir?

Posted by Ben Drees <be...@gmail.com>.
Hi,

I had trouble with this as well.  The version of Kafka I'm running insists
on using 'kafka/logs', so I create a soft link from there to the desired
destination directory:

# kafka scripts hard-code the logs dir, so point that path to where we want
the logs to be.
ln -s $STREAM_BUFFER_LOGS_DIR kafka/logs

-Ben


On Fri, Nov 14, 2014 at 11:17 AM, hsy541@gmail.com <hs...@gmail.com> wrote:

> Anyone has any idea how do I config the log4j file dir?
>
> On Thu, Nov 13, 2014 at 4:58 PM, hsy541@gmail.com <hs...@gmail.com>
> wrote:
>
> > Hi guys,
> >
> > Just notice kafka.logs.dir in log4j.properties doesn't take effect
> >
> > It's always set to *$base_dir/logs* in kafka-run-class.sh
> >
> > LOG_DIR=$base_dir/logs
> > KAFKA_LOG4J_OPTS="-Dkafka.logs.dir=$LOG_DIR $KAFKA_LOG4J_OPTS"
> >
> > Best,
> > Siyuan
> >
>

Re: log4j dir?

Posted by "hsy541@gmail.com" <hs...@gmail.com>.
Anyone has any idea how do I config the log4j file dir?

On Thu, Nov 13, 2014 at 4:58 PM, hsy541@gmail.com <hs...@gmail.com> wrote:

> Hi guys,
>
> Just notice kafka.logs.dir in log4j.properties doesn't take effect
>
> It's always set to *$base_dir/logs* in kafka-run-class.sh
>
> LOG_DIR=$base_dir/logs
> KAFKA_LOG4J_OPTS="-Dkafka.logs.dir=$LOG_DIR $KAFKA_LOG4J_OPTS"
>
> Best,
> Siyuan
>