Re: Specify log4j properties file

2016-03-09 Thread Tristan Nixon
You can also package an alternative log4j config in your jar files

> On Mar 9, 2016, at 12:20 PM, Ashic Mahtab  wrote:
> 
> Found it. 
> 
> You can pass in the jvm parameter log4j.configuration. The following works:
> 
> -Dlog4j.configuration=file:path/to/log4j.properties
> 
> It doesn't work without the file: prefix though. Tested in 1.6.0.
> 
> Cheers,
> Ashic.
> 
> From: as...@live.com
> To: user@spark.apache.org
> Subject: Specify log4j properties file
> Date: Wed, 9 Mar 2016 17:57:00 +
> 
> Hello,
> Is it possible to provide a log4j properties file when submitting jobs to a 
> cluster? I know that by default spark looks for a log4j.properties file in 
> the conf directory. I'm looking for a way to specify a different 
> log4j.properties file (external to the application) without pointing to a 
> completely different conf directory. Is there a way to achieve this?
> 
> Thanks,
> Ashic.



Re: Specify log4j properties file

2016-03-09 Thread Matt Narrell
You can also use --files, which doesn't require the file scheme.

On Wed, Mar 9, 2016 at 11:20 AM Ashic Mahtab  wrote:

> Found it.
>
> You can pass in the jvm parameter log4j.configuration. The following works:
>
> -Dlog4j.configuration=file:path/to/log4j.properties
>
> It doesn't work without the file: prefix though. Tested in 1.6.0.
>
> Cheers,
> Ashic.
>
> --
> From: as...@live.com
> To: user@spark.apache.org
> Subject: Specify log4j properties file
> Date: Wed, 9 Mar 2016 17:57:00 +
>
>
> Hello,
> Is it possible to provide a log4j properties file when submitting jobs to
> a cluster? I know that by default spark looks for a log4j.properties file
> in the conf directory. I'm looking for a way to specify a different
> log4j.properties file (external to the application) without pointing to a
> completely different conf directory. Is there a way to achieve this?
>
> Thanks,
> Ashic.
>


RE: Specify log4j properties file

2016-03-09 Thread Ashic Mahtab
Found it. 
You can pass in the jvm parameter log4j.configuration. The following works:
-Dlog4j.configuration=file:path/to/log4j.properties
It doesn't work without the file: prefix though. Tested in 1.6.0.
Cheers,Ashic.

From: as...@live.com
To: user@spark.apache.org
Subject: Specify log4j properties file
Date: Wed, 9 Mar 2016 17:57:00 +




Hello,Is it possible to provide a log4j properties file when submitting jobs to 
a cluster? I know that by default spark looks for a log4j.properties file in 
the conf directory. I'm looking for a way to specify a different 
log4j.properties file (external to the application) without pointing to a 
completely different conf directory. Is there a way to achieve this?
Thanks,Ashic.