debian-mirror-gitlab/lib/gitlab/app_logger.rb
2023-05-27 22:25:52 +05:30

19 lines
418 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', 'false'))
LOGGERS
else
[Gitlab::AppJsonLogger]
end
end
def self.primary_logger
Gitlab::AppTextLogger
end
end
end