Class: GRCommons::GRLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/gr_commons/gr_logger.rb

Overview

Note:

This module is for those who want to see low-level function calls in GR.

Outputs function calls to GR Framework to a log file. Mainly used for debugging.

How it works 

prepend a module named Inspector to the singular class of the FFI module. It will inspects the GR function call of the FFI module

Examples:

require 'gr_commons/gr_logger'
GRCommons.gr_log("log.txt")

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(out = $stderr) ⇒ GRLogger

Returns a new instance of GRLogger.



47
48
49
50
# File 'lib/gr_commons/gr_logger.rb', line 47

def initialize(out = $stderr)
  super(out, level: :info)
  @@logger ||= self
end

Class Method Details

.loggerObject

Return the last created GRLogger



43
44
45
# File 'lib/gr_commons/gr_logger.rb', line 43

def self.logger
  @@logger ||= GRCommons::GRLogger.new
end