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)

Open a notification client attached to the current {NOTIFY_LOG} if possible.
def self.open!(environment = ENV)
	if path = environment.delete(NOTIFY_LOG)
		self.new(path)
	end
end

def error!(text, **message)

`sd_notify` requires an `errno` key, which defaults to `-1` to indicate a generic error.
Send the specified error.
def error!(text, **message)
	message[:errno] ||= -1
	
	super
end

def initialize(path)

@parameter path [String] The path to the UNIX socket used for sending messages to the process manager.
Initialize the notification client.
def initialize(path)
	@path = path
end

def send(**message)

@parameter message [Hash]
Send the given message.
def send(**message)
	data = JSON.dump(message)
	
	File.open(@path, "a") do |file|
		file.puts(data)
	end
end