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



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

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

.clearObject



11
12
13
# File 'lib/logstasher/custom_fields.rb', line 11

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

.custom_fieldsObject



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

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

.custom_fields=(val) ⇒ Object



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

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