# How to set up the logging inside a plugin?

**URL:** <https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820>\
**Category:** Elasticsearch\
**Created:** [May 5, 2013, 11:08am UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820 "2013-05-05T11:08:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_G\_Ortega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_g_ortega/32/46359_2.png) [@David\_G\_Ortega](https://discuss.elastic.co/u/David_G_Ortega)\
**Post date:** [May 5, 2013, 11:08am UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820/1 "2013-05-05T11:08:39Z")

</div>

Hi,

Im writing a plugin and in the rest action Im trying to log an info with:

logger.info("binary data");

but the function is totally ignored, I can not see it nor in the log file  
nor in the stout.

Do I have to configure the config yml or something like that?

Cheers

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 5, 2013, 11:27am UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820/2 "2013-05-05T11:27:30Z")

</div>

No but probably something to change in logging.yml as your package probably does not start with org.elasticsearch

## HTH

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 mai 2013 à 13:08, David G Ortega [g.ortega.david@gmail.com](mailto:g.ortega.david@gmail.com) a écrit :

> Hi,
> 
> Im writing a plugin and in the rest action Im trying to log an info with:
> 
> logger.info("binary data");
> 
> but the function is totally ignored, I can not see it nor in the log file nor in the stout.
> 
> Do I have to configure the config yml or something like that?
> 
> ## Cheers
> 
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![David\_G\_Ortega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_g_ortega/32/46359_2.png) [@David\_G\_Ortega](https://discuss.elastic.co/u/David_G_Ortega)\
**Post date:** [May 5, 2013, 6:21pm UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820/3 "2013-05-05T18:21:58Z")

</div>

Ahh so its that...

Thanks David and congrats for having such a good memory 😉

El domingo, 5 de mayo de 2013 13:08:39 UTC+2, David G Ortega escribió:

> Hi,
> 
> Im writing a plugin and in the rest action Im trying to log an info with:
> 
> logger.info("binary data");
> 
> but the function is totally ignored, I can not see it nor in the log file  
> nor in the stout.
> 
> Do I have to configure the config yml or something like that?
> 
> Cheers

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![cyrilforce](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@cyrilforce](https://discuss.elastic.co/u/cyrilforce)\
**Post date:** [April 3, 2015, 7:53am UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820/4 "2015-04-03T07:53:02Z")

</div>

I am trying to enable plugin logging as well however with no luck with the  
following configuration in logging.yml

es.logger.level: INFO  
rootLogger: ${es.logger.level}, console, file  
logger:

action: DEBUG

com.amazonaws: WARN

com.mypackage: DEBUG, plugins\_log\_file

index.search.slowlog: DEBUG, index\_search\_slow\_log\_file  
index.indexing.slowlog: DEBUG, index\_indexing\_slow\_log\_file

additivity:  
index.search.slowlog: false  
index.indexing.slowlog: false

appender:  
console:  
type: console  
layout:  
type: consolePattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

plugins\_log\_file:  
type: dailyRollingFile  
file: ${path.logs}/${cluster.name}\_plugins.log  
datePattern: "'.'yyyy-MM-dd"  
layout:  
type: pattern  
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

I have seen the \_plugins.log successfully created in the log folder however  
nothing is printed there even i include the top level package in the  
configuration.

On Sunday, May 5, 2013 at 12:27:30 PM UTC+1, David Pilato wrote:

> No but probably something to change in logging.yml as your package  
> probably does not start with org.elasticsearch
> 
> ## HTH
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 5 mai 2013 à 13:08, David G Ortega \<[g.orteg...@gmail.com](mailto:g.orteg...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Hi,
> 
> Im writing a plugin and in the rest action Im trying to log an info with:
> 
> logger.info("binary data");
> 
> but the function is totally ignored, I can not see it nor in the log file  
> nor in the stout.
> 
> Do I have to configure the config yml or something like that?
> 
> Cheers
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/c3afc1f6-8dfd-4b45-b52b-4d362ebaf787%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c3afc1f6-8dfd-4b45-b52b-4d362ebaf787%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:21am UTC](https://discuss.elastic.co/t/how-to-set-up-the-logging-inside-a-plugin/11820/5 "2017-07-06T00:21:54Z")

</div>


