mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Figured out why @types
wasn't initializing before register. It needed to be above super
(thanks @jordansissel)
This commit is contained in:
parent
8a4627c3df
commit
6140f926b8
1 changed files with 1 additions and 1 deletions
|
@ -84,6 +84,7 @@ class LogStash::Codecs::Collectd < LogStash::Codecs::Base
|
|||
|
||||
public
|
||||
def initialize(params)
|
||||
@types = {} # This needs to be called before register (which super does).
|
||||
super
|
||||
@timestamp = Time.now().utc
|
||||
@collectd = {}
|
||||
|
@ -92,7 +93,6 @@ class LogStash::Codecs::Collectd < LogStash::Codecs::Base
|
|||
public
|
||||
def register
|
||||
@logger.info("Starting Collectd codec...")
|
||||
@types = {} # Need to register this here. It seems register gets called before initialize...
|
||||
if @typesdb.nil?
|
||||
if __FILE__ =~ /^file:\/.+!.+/
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue