Class: Google::Cloud::Debugger::Logpoint
- Inherits:
-
Breakpoint
- Object
- Breakpoint
- Google::Cloud::Debugger::Logpoint
- Defined in:
- lib/google/cloud/debugger/logpoint.rb
Overview
Logpoint
A kind of Breakpoint that can be evaluated to generate a formatted log string, which later can be submitted to Stackdriver Logging service
Instance Attribute Summary
Attributes inherited from Breakpoint
#action, #app_root, #condition, #create_time, #evaluated_expressions, #evaluated_log_message, #expressions, #final_time, #id, #is_final_state, #labels, #location, #log_level, #log_message_format, #stack_frames, #status, #user_email, #variable_table
Instance Method Summary collapse
-
#evaluate(call_stack_bindings) ⇒ Boolean
Evaluate the breakpoint unless it's already marked as completed.
Methods inherited from Breakpoint
#check_condition, #complete, #complete?, #eql?, #full_path, #line, #path, #set_error_state, #valid?
Instance Method Details
#evaluate(call_stack_bindings) ⇒ Boolean
Evaluate the breakpoint unless it's already marked as completed.
Store evaluted expressions and stack frame variables in
@evaluated_expressions
and @evaluated_log_message
.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/google/cloud/debugger/logpoint.rb', line 40 def evaluate call_stack_bindings synchronize do binding = call_stack_bindings[0] return false if complete? || !check_condition(binding) begin binding rescue StandardError return false end end true end |