debian-mirror-gitlab/lib/gitlab/app_logger.rb

20 lines
417 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2014-09-02 18:07:02 +05:30
module Gitlab
2020-03-13 15:44:24 +05:30
class AppLogger < Gitlab::MultiDestinationLogger
LOGGERS = [Gitlab::AppTextLogger, Gitlab::AppJsonLogger].freeze
def self.loggers
2020-10-24 23:57:45 +05:30
if Gitlab::Utils.to_boolean(ENV.fetch('UNSTRUCTURED_RAILS_LOG', 'true'))
LOGGERS
else
[Gitlab::AppJsonLogger]
end
2014-09-02 18:07:02 +05:30
end
2020-03-13 15:44:24 +05:30
def self.primary_logger
Gitlab::AppTextLogger
2014-09-02 18:07:02 +05:30
end
end
end