diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-10-03 14:28:40 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-03 14:28:40 +0300 |
commit | 2e76c604dfad0e44adf177795c576255c85b3171 (patch) | |
tree | 3e04bc3ce4b3a1ed4a6470020e32699de9431626 /config/initializers/grpc.rb | |
parent | ae9dd4b55248f33b36425c99d46532c945632cdc (diff) |
Add grpc.log for Gitaly
Diffstat (limited to 'config/initializers/grpc.rb')
-rw-r--r-- | config/initializers/grpc.rb | 11 |
1 files changed, 11 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 |