Class: AWS::Flow::LogMock
- Inherits:
-
Object
- Object
- AWS::Flow::LogMock
- Defined in:
- lib/aws/decider/executor.rb
Instance Attribute Summary collapse
-
#log_level ⇒ Object
Returns the value of attribute log_level.
Instance Method Summary collapse
- #debug(s) ⇒ Object
- #error(s) ⇒ Object
- #info(s) ⇒ Object
-
#initialize ⇒ LogMock
constructor
A new instance of LogMock.
- #warn(s) ⇒ Object
Constructor Details
#initialize ⇒ LogMock
Returns a new instance of LogMock.
24 25 |
# File 'lib/aws/decider/executor.rb', line 24 def initialize() end |
Instance Attribute Details
#log_level ⇒ Object
Returns the value of attribute log_level.
23 24 25 |
# File 'lib/aws/decider/executor.rb', line 23 def log_level @log_level end |
Instance Method Details
#debug(s) ⇒ Object
29 30 31 |
# File 'lib/aws/decider/executor.rb', line 29 def debug(s) p "debug: #{s}" if @log_level > 3 end |
#error(s) ⇒ Object
35 36 37 38 |
# File 'lib/aws/decider/executor.rb', line 35 def error(s) p "error: #{s}" if @log_level > 1 p s.backtrace if s.respond_to?(:backtrace) end |
#info(s) ⇒ Object
26 27 28 |
# File 'lib/aws/decider/executor.rb', line 26 def info(s) p "info: #{s}" if @log_level > 4 end |
#warn(s) ⇒ Object
32 33 34 |
# File 'lib/aws/decider/executor.rb', line 32 def warn(s) p "warn: #{s}" if @log_level > 2 end |