gitlab-org--gitlab-foss/lib/gitlab/app_logger.rb

20 lines
417 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2012-09-11 16:24:53 -04:00
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
2012-09-11 16:24:53 -04:00
end
def self.primary_logger
Gitlab::AppTextLogger
2012-09-11 16:24:53 -04:00
end
end
end