Class: Restash::Logger
- Inherits:
-
Object
- Object
- Restash::Logger
- Defined in:
- lib/restash/logger.rb
Instance Method Summary collapse
-
#initialize(host, port, options) ⇒ Logger
constructor
A new instance of Logger.
- #write(data) ⇒ Object
Constructor Details
#initialize(host, port, options) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 |
# File 'lib/restash/logger.rb', line 6 def initialize(host, port, ) @host = host @port = port @options = end |
Instance Method Details
#write(data) ⇒ Object
12 13 14 15 16 |
# File 'lib/restash/logger.rb', line 12 def write(data) sock = TCPTimeout::TCPSocket.new(@host, @port, @options) sock.write(data) sock.close end |