debian-mirror-gitlab/lib/gitlab/app_logger.rb
2020-10-24 23:57:45 +05:30

19 lines
417 B
Ruby

# frozen_string_literal: true
module Gitlab
class AppLogger < Gitlab::MultiDestinationLogger
LOGGERS = [Gitlab::AppTextLogger, Gitlab::AppJsonLogger].freeze
def self.loggers
if Gitlab::Utils.to_boolean(ENV.fetch('UNSTRUCTURED_RAILS_LOG', 'true'))
LOGGERS
else
[Gitlab::AppJsonLogger]
end
end
def self.primary_logger
Gitlab::AppTextLogger
end
end
end