# How to access logger from lang-javascript

**URL:** <https://discuss.elastic.co/t/how-to-access-logger-from-lang-javascript/23680>\
**Category:** Elasticsearch\
**Created:** [May 25, 2015, 10:27am UTC](https://discuss.elastic.co/t/how-to-access-logger-from-lang-javascript/23680 "2015-05-25T10:27:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishekbatra](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@abhishekbatra](https://discuss.elastic.co/u/abhishekbatra)\
**Post date:** [May 25, 2015, 10:27am UTC](https://discuss.elastic.co/t/how-to-access-logger-from-lang-javascript/23680/1 "2015-05-25T10:27:56Z")

</div>

I have just started using lang-javascript for calculating a custom score,  
and want to debug the script I have written. I checked out the following  
links:

[https://groups.google.com/forum/#!searchin/elasticsearch/javascript$20log/elasticsearch/NwTjyJ35ZoU/ffEPiJq\_K0QJ](https://groups.google.com/forum/#!searchin/elasticsearch/javascript$20log/elasticsearch/NwTjyJ35ZoU/ffEPiJq_K0QJ)

> > [Redirecting to Google Groups](https://groups.google.com/forum/#!searchin/elasticsearch/javascript$20log/elasticsearch/wwaaWsKZ7Nw/sVpEqV2Mi3YJ)

and searched through elasticsearch documentation but am unable to figure  
out how to log from within the lang-javascript script. Can anyone point to  
any relevant documentation or give an example?

Thanks

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

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/1b29c929-7693-41f6-953c-5fd552526cad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1b29c929-7693-41f6-953c-5fd552526cad%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:12am UTC](https://discuss.elastic.co/t/how-to-access-logger-from-lang-javascript/23680/2 "2017-07-06T00:12:08Z")

</div>


