Class: Palmade::Tapsilog::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/palmade/tapsilog/server.rb

Constant Summary collapse

SeverityLevels =
[:debug, :info, :warn, :error, :fatal]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nowObject (readonly)

Returns the value of attribute now.



6
7
8
# File 'lib/palmade/tapsilog/server.rb', line 6

def now
  @now
end

Class Method Details

.add_log(log) ⇒ Object



17
18
19
# File 'lib/palmade/tapsilog/server.rb', line 17

def self.add_log(log)
  @queue << ([@now] + log)
end

.keyObject



21
22
23
# File 'lib/palmade/tapsilog/server.rb', line 21

def self.key
  @config[:key].to_s
end

.start(config, protocol = Palmade::Tapsilog::Protocol) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/palmade/tapsilog/server.rb', line 8

def self.start(config, protocol = Palmade::Tapsilog::Protocol)
  @config = config
  @protocol = protocol
  @tsocks = []
  @usocks = []
  @queue = []
  boot
end