class Async::Container::Notify::Log
Represents a client that uses a local log file to communicate readiness, status changes, etc.
def self.open!(environment = ENV)
def self.open!(environment = ENV) if path = environment.delete(NOTIFY_LOG) self.new(path) end end
def error!(text, **message)
Send the specified error.
def error!(text, **message) message[:errno] ||= -1 super end
def initialize(path)
Initialize the notification client.
def initialize(path) @path = path end
def send(**message)
Send the given message.
def send(**message) data = JSON.dump(message) File.open(@path, "a") do |file| file.puts(data) end end