debian-mirror-gitlab/lib/gitlab/app_logger.rb
2023-06-20 00:43:36 +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::AppJsonLogger
end
end
end