Sha256: 3afb9545fa83d283203b154d78e61a695bbfa52cff6d9a9a75a447e7251ee5f0

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require "model_log/version"
require "model_log/passport"
require "model_log/request"
require "model_log/class_methods/models"
require "model_log/class_methods/controllers"

module ModelLog
  class << self
    attr_accessor :platform, :current_user_method, :user_name_field

    def info(content)
      content = content.chomp + "\n"
      File.open("#{Rails.root.to_s}/log/model_log_#{Rails.env}.log", "a+") do |output|
        output.write(content)
      end
    end
  end

  @current_user_method = @current_user_method || :current_passport
  @user_name_field = @user_name_field || :username
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
model_log-1.0.1 lib/model_log.rb