Module: LogStasher::CustomFields

Defined in:
lib/logstasher/custom_fields.rb

Defined Under Namespace

Modules: LogSubscriber

Class Method Summary collapse

Class Method Details

.add(*fields) ⇒ Object



18
19
20
# File 'lib/logstasher/custom_fields.rb', line 18

def self.add(*fields)
  custom_fields.concat(fields).uniq!
end

.clearObject



14
15
16
# File 'lib/logstasher/custom_fields.rb', line 14

def self.clear
  Thread.current[:logstasher_custom_fields] = []
end

.custom_fieldsObject



22
23
24
# File 'lib/logstasher/custom_fields.rb', line 22

def self.custom_fields
  Thread.current[:logstasher_custom_fields] ||= []
end

.custom_fields=(val) ⇒ Object



26
27
28
# File 'lib/logstasher/custom_fields.rb', line 26

def self.custom_fields=(val)
  Thread.current[:logstasher_custom_fields] = val
end