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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
417 B
Ruby
Raw Normal View History

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