# No logs from Java client?

**URL:** <https://discuss.elastic.co/t/no-logs-from-java-client/7718>\
**Category:** Elasticsearch\
**Created:** [May 16, 2012, 1:45pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718 "2012-05-16T13:45:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jschelle\_2](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jschelle\_2](https://discuss.elastic.co/u/jschelle_2)\
**Post date:** [May 16, 2012, 1:45pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/1 "2012-05-16T13:45:49Z")

</div>

I'm trying to debug why I get NoNodeAvailableExceptions after my client has  
been running for a few minutes. I found a post on here that suggested  
turning up the logging level for org.elasticsearch.discovery but I can't  
seem to do this (I know, dumb problem to have). I'm not using any logging  
API in my code (its just prototype for the moment), but the log4j jar is  
there and there's a log4j.xml [https://gist.github.com/2710431](https://gist.github.com/2710431) file.  
Where am I supposed to set the logging settings?!

---

<div class="post-metadata">

**Author:** ![jschelle\_2](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jschelle\_2](https://discuss.elastic.co/u/jschelle_2)\
**Post date:** [May 16, 2012, 1:49pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/2 "2012-05-16T13:49:33Z")

</div>

\*\*TYPO: the package I want to set to DEBUG level logging is  
org.elasticsearch.client.transport

On Wednesday, May 16, 2012 9:45:49 AM UTC-4, shadow000fire wrote:

> I'm trying to debug why I get NoNodeAvailableExceptions after my client  
> has been running for a few minutes. I found a post on here that suggested  
> turning up the logging level for org.elasticsearch.discovery but I can't  
> seem to do this (I know, dumb problem to have). I'm not using any logging  
> API in my code (its just prototype for the moment), but the log4j jar is  
> there and there's a log4j.xml [https://gist.github.com/2710431](https://gist.github.com/2710431) file.  
> Where am I supposed to set the logging settings?!

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 16, 2012, 3:10pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/3 "2012-05-16T15:10:40Z")

</div>

Are you trying to log on the client or server side? On the server  
side, there is a logging.yml file in the config directory. For the  
client side, it is all up to your logging setup. Is log4j working at  
all?

--  
Ivan

On Wed, May 16, 2012 at 6:49 AM, shadow000fire [jason.scheller@gmail.com](mailto:jason.scheller@gmail.com) wrote:

> \*\*TYPO: the package I want to set to DEBUG level logging is  
> org.elasticsearch.client.transport
> 
> On Wednesday, May 16, 2012 9:45:49 AM UTC-4, shadow000fire wrote:
> 
> > I'm trying to debug why I get NoNodeAvailableExceptions after my client  
> > has been running for a few minutes. I found a post on here that suggested  
> > turning up the logging level for org.elasticsearch.discovery but I can't  
> > seem to do this (I know, dumb problem to have). I'm not using any logging  
> > API in my code (its just prototype for the moment), but the log4j jar is  
> > there and there's a log4j.xml file. Where am I supposed to set the logging  
> > settings?!

---

<div class="post-metadata">

**Author:** ![jschelle\_2](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jschelle\_2](https://discuss.elastic.co/u/jschelle_2)\
**Post date:** [May 16, 2012, 3:13pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/4 "2012-05-16T15:13:15Z")

</div>

Thanks Ivan. No, log4j wasn't working at all on the client side (server  
side works fine) and I'm not familiar with log4j. Turns it log4j doesn't  
understand -Dlog4j.configuration=C:\workspaces\ES\ESBenchmark\log4j.xml  
because its expecting a URL, so I had to make it  
-Dlog4j.configuration=file:///C:\workspaces\ES\ESBenchmark\log4j.xml. I  
knew it was something dumb.

On Wednesday, May 16, 2012 11:10:40 AM UTC-4, Ivan Brusic wrote:

> Are you trying to log on the client or server side? On the server  
> side, there is a logging.yml file in the config directory. For the  
> client side, it is all up to your logging setup. Is log4j working at  
> all?
> 
> --  
> Ivan
> 
> On Wed, May 16, 2012 at 6:49 AM, shadow000fire \<\> wrote:
> 
> > \*\*TYPO: the package I want to set to DEBUG level logging is  
> > org.elasticsearch.client.transport
> > 
> > On Wednesday, May 16, 2012 9:45:49 AM UTC-4, shadow000fire wrote:
> > 
> > > I'm trying to debug why I get NoNodeAvailableExceptions after my client  
> > > has been running for a few minutes. I found a post on here that  
> > > suggested  
> > > turning up the logging level for org.elasticsearch.discovery but I  
> > > can't  
> > > seem to do this (I know, dumb problem to have). I'm not using any  
> > > logging  
> > > API in my code (its just prototype for the moment), but the log4j jar  
> > > is  
> > > there and there's a log4j.xml file. Where am I supposed to set the  
> > > logging  
> > > settings?!

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 16, 2012, 4:20pm UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/5 "2012-05-16T16:20:33Z")

</div>

Logging has never been easy on the JVM. Too many different formats,  
third-party libs bundling their own, embedded jars, etc.. Glad you got  
it working.

--  
Ivan

On Wed, May 16, 2012 at 8:13 AM, shadow000fire [jason.scheller@gmail.com](mailto:jason.scheller@gmail.com) wrote:

> Thanks Ivan. No, log4j wasn't working at all on the client side (server  
> side works fine) and I'm not familiar with log4j. Turns it log4j doesn't  
> understand -Dlog4j.configuration=C:\workspaces\ES\ESBenchmark\log4j.xml  
> because its expecting a URL, so I had to make it  
> -Dlog4j.configuration=file:///C:\workspaces\ES\ESBenchmark\log4j.xml. I  
> knew it was something dumb.
> 
> On Wednesday, May 16, 2012 11:10:40 AM UTC-4, Ivan Brusic wrote:
> 
> > Are you trying to log on the client or server side? On the server  
> > side, there is a logging.yml file in the config directory. For the  
> > client side, it is all up to your logging setup. Is log4j working at  
> > all?
> > 
> > --  
> > Ivan
> > 
> > On Wed, May 16, 2012 at 6:49 AM, shadow000fire \<\> wrote:
> > 
> > > \*\*TYPO: the package I want to set to DEBUG level logging is  
> > > org.elasticsearch.client.transport
> > > 
> > > On Wednesday, May 16, 2012 9:45:49 AM UTC-4, shadow000fire wrote:
> > > 
> > > > I'm trying to debug why I get NoNodeAvailableExceptions after my client  
> > > > has been running for a few minutes. I found a post on here that  
> > > > suggested  
> > > > turning up the logging level for org.elasticsearch.discovery but I  
> > > > can't  
> > > > seem to do this (I know, dumb problem to have). I'm not using any  
> > > > logging  
> > > > API in my code (its just prototype for the moment), but the log4j jar  
> > > > is  
> > > > there and there's a log4j.xml file. Where am I supposed to set the  
> > > > logging  
> > > > settings?!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:28am UTC](https://discuss.elastic.co/t/no-logs-from-java-client/7718/6 "2017-07-06T03:28:34Z")

</div>


