# Debugging scripts

**URL:** <https://discuss.elastic.co/t/debugging-scripts/17558>\
**Category:** Elasticsearch\
**Created:** [May 16, 2014, 1:33pm UTC](https://discuss.elastic.co/t/debugging-scripts/17558 "2014-05-16T13:33:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Snare](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_snare/32/1569_2.png) [@Mike\_Snare](https://discuss.elastic.co/u/Mike_Snare)\
**Post date:** [May 16, 2014, 1:33pm UTC](https://discuss.elastic.co/t/debugging-scripts/17558/1 "2014-05-16T13:33:12Z")

</div>

I'm trying to debug an MVEL script that's failing in production but working  
locally, and I've tried to do logging a couple different ways, but I can  
only get logging to work locally.

Both local and production are running 1.1.1, same exact build. Both are  
running with java 1.7.\_55.

I've tried the logger approach based  
on [https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging\_from\_script.sh](https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging_from_script.sh),  
but that only works when the server is running under java 1.6. Under 1.7,  
both local and production fail.

I've tried using System.out.println, but that only works locally even under  
java 1.7. In production I just get "error":  
"ElasticsearchIllegalArgumentException[failed to execute script]; nested:  
PropertyAccessException[[Error: unresolvable property or identifier:  
]\n[Near : {... System.out.println("SCRIPT: ....}]\n ^\n[Line: 12, Column:  
1]]; "

Does anyone have any pointers as to how to debug MVEL or get log output  
from MVEL scripts in ES?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c6914ca7-a4da-4bb5-97c6-4a299d68d2c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c6914ca7-a4da-4bb5-97c6-4a299d68d2c3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![mromagnoli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mromagnoli/32/839_2.png) [@mromagnoli](https://discuss.elastic.co/u/mromagnoli)\
**Post date:** [May 16, 2014, 2:59pm UTC](https://discuss.elastic.co/t/debugging-scripts/17558/2 "2014-05-16T14:59:38Z")

</div>

Someone should can answer this issue, I'm having the same problem logging  
scripts. Maybe Imovot can.

El viernes, 16 de mayo de 2014 10:33:12 UTC-3, Mike Snare escribió:

> I'm trying to debug an MVEL script that's failing in production but  
> working locally, and I've tried to do logging a couple different ways, but  
> I can only get logging to work locally.
> 
> Both local and production are running 1.1.1, same exact build. Both are  
> running with java 1.7.\_55.
> 
> I've tried the logger approach based on  
> [https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging\_from\_script.sh](https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging_from_script.sh),  
> but that only works when the server is running under java 1.6. Under 1.7,  
> both local and production fail.
> 
> I've tried using System.out.println, but that only works locally even  
> under java 1.7. In production I just get "error":  
> "ElasticsearchIllegalArgumentException[failed to execute script]; nested:  
> PropertyAccessException[[Error: unresolvable property or identifier:  
> ]\n[Near : {... System.out.println("SCRIPT: ....}]\n ^\n[Line: 12, Column:  
> 1]]; "
> 
> Does anyone have any pointers as to how to debug MVEL or get log output  
> from MVEL scripts in ES?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d8bc37f2-b3ea-4711-8bcd-eb65af9b61f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d8bc37f2-b3ea-4711-8bcd-eb65af9b61f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Cristiana\_Tiugan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cristiana_tiugan/32/93274_2.png) [@Cristiana\_Tiugan](https://discuss.elastic.co/u/Cristiana_Tiugan)\
**Post date:** [October 18, 2016, 11:04am UTC](https://discuss.elastic.co/t/debugging-scripts/17558/3 "2016-10-18T11:04:17Z")

</div>

> [@Mike\_Snare](#):
>
> [https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging\_from\_script.sh](https://github.com/imotov/elasticsearch-test-scripts/blob/master/logging_from_script.sh),

I know it's a bit late, but you should try this:  
[https://www.elastic.co/blog/elasticsearch-logging-secrets](https://www.elastic.co/blog/elasticsearch-logging-secrets)

---

<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 5, 2017, 10:11pm UTC](https://discuss.elastic.co/t/debugging-scripts/17558/4 "2017-07-05T22:11:35Z")

</div>


