Class: Palmade::Tapsilog::Adapters::ProxyAdapter

Inherits:
BaseAdapter
  • Object
show all
Defined in:
lib/palmade/tapsilog/adapters/proxy_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ProxyAdapter

Returns a new instance of ProxyAdapter.



4
5
6
# File 'lib/palmade/tapsilog/adapters/proxy_adapter.rb', line 4

def initialize(config)
  super(config)
end

Instance Method Details

#closeObject



22
23
24
# File 'lib/palmade/tapsilog/adapters/proxy_adapter.rb', line 22

def close
  conn.close
end

#flushObject



18
19
20
# File 'lib/palmade/tapsilog/adapters/proxy_adapter.rb', line 18

def flush
  conn.flush
end

#write(log_message) ⇒ Object



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

def write(log_message)
  service = log_message[1]
  instance_key = log_message[2]
  severity = log_message[3]
  message = log_message[4]
  tags = log_message[5]

  conn.log(service, instance_key, severity, message, tags)
end