Add grpc.log for Gitaly
This commit is contained in:
parent
ae9dd4b552
commit
2e76c604df
2 changed files with 19 additions and 0 deletions
11
config/initializers/grpc.rb
Normal file
11
config/initializers/grpc.rb
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue