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 <lihu...@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.
>
>

Reply via email to