Commit 56fb58f9 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'dedicated-elasticsearch-log-file' into 'master'

Dedicated elasticsearch log file

See merge request gitlab-org/gitlab!21624
parents 522bbb16 7638a741
...@@ -393,6 +393,23 @@ It is stored at: ...@@ -393,6 +393,23 @@ It is stored at:
- `/var/log/gitlab/gitlab-rails/database_load_balancing.log` for Omnibus GitLab packages. - `/var/log/gitlab/gitlab-rails/database_load_balancing.log` for Omnibus GitLab packages.
- `/home/git/gitlab/log/database_load_balancing.log` for installations from source. - `/home/git/gitlab/log/database_load_balancing.log` for installations from source.
## `elasticsearch.log`
Introduced in GitLab 12.6. This file lives in
`/var/log/gitlab/gitlab-rails/elasticsearch.log` for Omnibus GitLab
packages or in `/home/git/gitlab/log/elasticsearch.log` for installations
from source.
It logs information related to the Elasticsearch Integration including
errors during indexing or searching Elasticsearch.
Each line contains a JSON line that can be ingested by Elasticsearch, Splunk,
etc. For example:
```json
{"severity":"DEBUG","time":"2019-10-17T06:23:13.227Z","correlation_id":null,"message":"redacted_search_result","class_name":"Milestone","id":2,"ability":"read_milestone","current_user_id":2,"query":"project"}
```
[repocheck]: repository_checks.md [repocheck]: repository_checks.md
[Rack Attack]: ../security/rack_attack.md [Rack Attack]: ../security/rack_attack.md
[Rate Limit]: ../user/admin_area/settings/rate_limits_on_raw_endpoints.md [Rate Limit]: ../user/admin_area/settings/rate_limits_on_raw_endpoints.md
......
...@@ -52,7 +52,7 @@ module EE ...@@ -52,7 +52,7 @@ module EE
private private
def logger def logger
@logger ||= ::Gitlab::ProjectServiceLogger.build @logger ||= ::Gitlab::Elasticsearch::Logger.build
end end
end end
end end
# frozen_string_literal: true
module Gitlab
module Elasticsearch
class Logger < ::Gitlab::JsonLogger
def self.file_name_noext
'elasticsearch'
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment