Class: Spree::MollieLogger

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/mollie_logger.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.logger=(value) ⇒ Object (writeonly)

Sets the attribute logger

Parameters:

  • value

    the value to set the attribute logger to.



13
14
15
# File 'app/models/spree/mollie_logger.rb', line 13

def logger=(value)
  @logger = value
end

Class Method Details

.debug(message = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/models/spree/mollie_logger.rb', line 3

def self.debug(message = nil)
  return unless message.present?
 
  @logger ||= Logger.new(File.join(Rails.root, 'log', 'solidus_mollie.log'))

  #  .datetime_format = "%Y-%m-%d %H:%M:%S"
  @logger.debug(message)
end