diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-04 16:41:58 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-04-04 16:41:58 +0300 |
commit | b15dd5dfa2ac269763d6342d7f0b3d9a64eb7fe4 (patch) | |
tree | 020172331413472dcce1ad22aa669cf60d157bbc /doc/administration/logs.md | |
parent | 873a1d9364337b4de4665032a5841a162706d1d4 (diff) | |
parent | 6415ac9e994640474eaa5b0fee3914934d85b35b (diff) |
Merge branch 'sh-gitlab-sidekiq-logger' into 'master'
Add support for Sidekiq JSON logging
Closes #20060
See merge request gitlab-org/gitlab-ce!18121
Diffstat (limited to 'doc/administration/logs.md')
-rw-r--r-- | doc/administration/logs.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/administration/logs.md b/doc/administration/logs.md index cd107a5b39c..c8a3ef80e8f 100644 --- a/doc/administration/logs.md +++ b/doc/administration/logs.md @@ -146,6 +146,28 @@ this file. For example: 2014-06-10T18:18:26Z 14299 TID-55uqo INFO: Booting Sidekiq 3.0.0 with redis options {:url=>"redis://localhost:6379/0", :namespace=>"sidekiq"} ``` +Instead of the format above, you can opt to generate JSON logs for +Sidekiq. For example: + +```json +{"severity":"INFO","time":"2018-04-03T22:57:22.071Z","queue":"cronjob:update_all_mirrors","args":[],"class":"UpdateAllMirrorsWorker","retry":false,"queue_namespace":"cronjob","jid":"06aeaa3b0aadacf9981f368e","created_at":"2018-04-03T22:57:21.930Z","enqueued_at":"2018-04-03T22:57:21.931Z","pid":10077,"message":"UpdateAllMirrorsWorker JID-06aeaa3b0aadacf9981f368e: done: 0.139 sec","job_status":"done","duration":0.139,"completed_at":"2018-04-03T22:57:22.071Z"} +``` + +For Omnibus GitLab installations, add the configuration option: + +```ruby +sidekiq['log_format'] = 'json' +``` + +For source installations, edit the `gitlab.yml` and set the Sidekiq +`log_format` configuration option: + +```yaml + ## Sidekiq + sidekiq: + log_format: json +``` + ## `gitlab-shell.log` This file lives in `/var/log/gitlab/gitlab-shell/gitlab-shell.log` for |