Module: Ariadne::LoggerHelper

Included in:
FetchOrFallbackHelper
Defined in:
app/lib/ariadne/logger_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#loggerObject



6
7
8
9
10
11
# File 'app/lib/ariadne/logger_helper.rb', line 6

def logger
  return Rails.logger if defined?(Rails) && Rails.logger

  require "logger"
  Logger.new($stderr)
end

#silence_deprecations?Boolean

TODO: test

Returns:

  • (Boolean)


14
15
16
# File 'app/lib/ariadne/logger_helper.rb', line 14

def silence_deprecations?
  Rails.application.config.ariadne_view_components.silence_deprecations
end

#silence_warnings?Boolean

TODO: test

Returns:

  • (Boolean)


19
20
21
# File 'app/lib/ariadne/logger_helper.rb', line 19

def silence_warnings?
  Rails.application.config.ariadne_view_components.silence_warnings
end