spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Cjc <cjcro...@gmail.com>
Subject Re: how to use the log4j for the standalone app
Date Tue, 11 Mar 2014 03:49:40 GMT
Hi lihu,

you can extends the org.apache.spark.logging class. Then use the function
like logInfo(). Then will log according to the config in your
log4j.properties.

Best Regards,
Chen Jingci


On Tue, Mar 11, 2014 at 11:36 AM, lihu <lihu723@gmail.com> wrote:

> Hi,
>    I use the spark0.9, and when i run the spark-shell, I can log property
> according the log4j.properties in the SPARK_HOME/conf directory.But when I
> use the standalone app, I do not know how to log it.
>
>   I use the SparkConf to set it, such as:
>
>   *val conf = new SparkConf()*
> *  conf.set("*log4j.configuration*", "/home/hadoop/spark/conf/l*
> *og4j.properties**")*
>
>   but it does not work.
>
>   this question maybe simple, but I can not find anything in the web. and
> I think this maybe helpful for many people who do not familiar with spark.
>
>

Mime
View raw message