Module: ReactManifest::Logging

Instance Method Summary collapse

Instance Method Details

#log_debug(message) ⇒ Object



3
4
5
6
7
# File 'lib/react_manifest/logging.rb', line 3

def log_debug(message)
  full = "[ReactManifest] #{message}"
  Rails.logger.debug(full)
  $stdout.puts(full) if stdout_logging_needed?
end

#log_info(message) ⇒ Object



9
10
11
12
13
# File 'lib/react_manifest/logging.rb', line 9

def log_info(message)
  full = "[ReactManifest] #{message}"
  Rails.logger.info(full)
  $stdout.puts(full) if stdout_logging_needed?
end

#log_warn(message) ⇒ Object



15
16
17
18
19
# File 'lib/react_manifest/logging.rb', line 15

def log_warn(message)
  full = "[ReactManifest] #{message}"
  Rails.logger.warn(full)
  $stdout.puts(full) if stdout_logging_needed?
end