Commit 5db8cef1784592e3a5c9ed4e1ee97bbc690be9b1
1 parent
f2dd579f
Exists in
master
and in
21 other branches
Added lograge to readme
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
README.md
... | ... | @@ -723,6 +723,18 @@ Searchkick.client = Elasticsearch::Client.new(hosts: ["localhost:9200", "localho |
723 | 723 | |
724 | 724 | See [elasticsearch-transport](https://github.com/elasticsearch/elasticsearch-ruby/blob/master/elasticsearch-transport) for a complete list of options. |
725 | 725 | |
726 | +### Lograge | |
727 | + | |
728 | +Add the following to `config/environments/production.rb`: | |
729 | + | |
730 | +```ruby | |
731 | +config.lograge.custom_options = lambda do |event| | |
732 | + options = {} | |
733 | + options[:search] = event.payload[:searchkick_runtime] if event.payload[:searchkick_runtime].to_f > 0 | |
734 | + options | |
735 | +end | |
736 | +``` | |
737 | + | |
726 | 738 | ## Advanced |
727 | 739 | |
728 | 740 | Prefer to use the [Elasticsearch DSL](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-queries.html) but still want awesome features like zero-downtime reindexing? | ... | ... |