差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
java:elastic:elasticsearch [2016/12/13 14:02]
tony
java:elastic:elasticsearch [2023/06/25 09:48] (目前版本)
行 28: 行 28:
 <​replaceregexp file="​config/​logging.yml"​ match="​[ \t]*datePattern:​ .*[\r\n]*"​ replace=""​ flags="​g"/>​ <​replaceregexp file="​config/​logging.yml"​ match="​[ \t]*datePattern:​ .*[\r\n]*"​ replace=""​ flags="​g"/>​
 </​code>​ </​code>​
-===== 修改elasticsearch.yml打開search與index的debug =====+===== 打開search與index的debug ===== 
 +在使用預設的loggin.yml情況下,新增以下內容到elasticsearch.yml:​
 <​code>​ <​code>​
 index.search.slowlog.threshold.query.debug:​ 0s index.search.slowlog.threshold.query.debug:​ 0s
行 34: 行 35:
 index.indexing.slowlog.threshold.index.debug:​ 0s index.indexing.slowlog.threshold.index.debug:​ 0s
 </​code>​ </​code>​
 +接著使用rest client去操作elasticsearch:​
 +<​code>​
 +curl http://​127.0.0.1:​9200/​_search
 +</​code>​
 +最後就可以查看index_search_slowlog.log的內容;裡面要有資料才會有log產生。
 ===== Reference ===== ===== Reference =====
   * [[http://​elasticsearch-users.115913.n3.nabble.com/​log-file-rolling-by-size-td4025190.html|設定rolling file by size的方法]]   * [[http://​elasticsearch-users.115913.n3.nabble.com/​log-file-rolling-by-size-td4025190.html|設定rolling file by size的方法]]
行 40: 行 46:
   * [[https://​www.elastic.co/​guide/​en/​elasticsearch/​guide/​current/​logging.html|by index的log設定]]   * [[https://​www.elastic.co/​guide/​en/​elasticsearch/​guide/​current/​logging.html|by index的log設定]]
   * [[http://​www.slideshare.net/​rueian3/​elasticsearch-45855699|elasticsearch簡介]]   * [[http://​www.slideshare.net/​rueian3/​elasticsearch-45855699|elasticsearch簡介]]
 +  * [[http://​www.openskill.cn/​article/​257|分析gc of log file]] 
 +  * [[http://​www.jianshu.com/​p/​fa31f38d241e|使用ElasticSearch踩过的坑]]