diff options
author | Rémy Coutable <remy@rymai.me> | 2017-10-03 14:28:40 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-03 14:28:40 +0300 |
commit | 5b56cd3b59e39a976217ee872fbbb185c012b655 (patch) | |
tree | 3e04bc3ce4b3a1ed4a6470020e32699de9431626 | |
parent | ae9dd4b55248f33b36425c99d46532c945632cdc (diff) | |
parent | 2e76c604dfad0e44adf177795c576255c85b3171 (diff) |
Merge branch 'grpc-logger' into 'master'
Add grpc.log for Gitaly
See merge request gitlab-org/gitlab-ce!14632
-rw-r--r-- | config/initializers/grpc.rb | 11 | ||||
-rw-r--r-- | doc/administration/gitaly/index.md | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/config/initializers/grpc.rb b/config/initializers/grpc.rb new file mode 100644 index 00000000000..b96962fe7db --- /dev/null +++ b/config/initializers/grpc.rb @@ -0,0 +1,11 @@ +require 'logger' + +GRPC_LOGGER = Logger.new(Rails.root.join('log/grpc.log')) +GRPC_LOGGER.level = ENV['GRPC_LOG_LEVEL'].presence || 'WARN' +GRPC_LOGGER.progname = 'GRPC' + +module GRPC + def self.logger + GRPC_LOGGER + end +end diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md index 40099dcc967..e3b10119090 100644 --- a/doc/administration/gitaly/index.md +++ b/doc/administration/gitaly/index.md @@ -32,6 +32,14 @@ prometheus_listen_addr = "localhost:9236" Changes to `/home/git/gitaly/config.toml` are applied when you run `service gitlab restart`. +## Client-side GRPC logs + +Gitaly uses the [gRPC](https://grpc.io/) RPC framework. The Ruby gRPC +client has its own log file which may contain useful information when +you are seeing Gitaly errors. You can control the log level of the +gRPC client with the `GRPC_LOG_LEVEL` environment variable. The +default level is `WARN`. + ## Running Gitaly on its own server > This is an optional way to deploy Gitaly which can benefit GitLab |