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

20 lines
418 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
2023-05-27 22:25:52 +05:30
if Gitlab::Utils.to_boolean(ENV.fetch('UNSTRUCTURED_RAILS_LOG', 'false'))
2020-10-24 23:57:45 +05:30
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
2023-06-20 00:43:36 +05:30
Gitlab::AppJsonLogger
2014-09-02 18:07:02 +05:30
end
end
end