class Coursemology::Evaluator::Logging::ClientLogSubscriber
Public Instance Methods
allocate(event)
click to toggle source
# File lib/coursemology/evaluator/logging/client_log_subscriber.rb, line 7 def allocate(event) info color("Client: Allocate (#{event.duration.round(1)}ms)", MAGENTA) end
allocate_fail(e:)
click to toggle source
# File lib/coursemology/evaluator/logging/client_log_subscriber.rb, line 11 def allocate_fail(e:) error color("Client: Allocate failed: #{e.message}", RED) end
evaluate(event)
click to toggle source
# File lib/coursemology/evaluator/logging/client_log_subscriber.rb, line 15 def evaluate(event) info "#{color("Client: Evaluate (#{event.duration.round(1)}ms)", CYAN)} "\ "#{event.payload[:evaluation].language.class.display_name}" end
publish(name, *args)
click to toggle source
# File lib/coursemology/evaluator/logging/client_log_subscriber.rb, line 3 def publish(name, *args) send(name.split('.').first, *args) end
save(event)
click to toggle source
# File lib/coursemology/evaluator/logging/client_log_subscriber.rb, line 20 def save(event) info color("Client: Save (#{event.duration.round(1)}ms)", GREEN) end