Welcome to mirror list, hosted at ThFree Co, Russian Federation.

app_logger.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a39e7f318869f7bf3b0d9191df60afcbafddf0cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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