class Console::Compatible::Logger::LogDevice

A compatible log device which can be used with {Console}. Suitable for use with code which (incorrectly) assumes that the log device a public interface and has certain methods/behaviours.

def call(*arguments, **options)

@parameter options [Hash] Additional options.
@paraemter arguments [Array] The arguments to log.

Log a message with the given severity.
def call(*arguments, **options)
	@output.call(*arguments, **options)
end

def close

Close the log device. This is a no-op.
def close
end

def initialize(subject, output)

@parameter output [Console::Interface] The output interface.
@parameter subject [String] The subject of the log messages.

Create a new log device.
def initialize(subject, output)
	@subject = subject
	@output = output
end

def reopen

Reopen the log device. This is a no-op.
def reopen
end

def write(message)

@parameter message [String] The message to write.

Write a message to the log device.
def write(message)
	@output.call(@subject, message)
end