Skip to content

Fixed assign the Fluent::Log to Fluent::ChangeFinder#18

Open
tkuchiki wants to merge 1 commit intomuddydixon:masterfrom
tkuchiki:fix_log_debug_change_finder
Open

Fixed assign the Fluent::Log to Fluent::ChangeFinder#18
tkuchiki wants to merge 1 commit intomuddydixon:masterfrom
tkuchiki:fix_log_debug_change_finder

Conversation

@tkuchiki
Copy link
Copy Markdown
Contributor

# change_finder.rb
def next(x)
...
      log.debug "change_finder:#{Thread.current.object_id} x:#{x} xt:#{xt} p:#{p} s:#{s} term:#{@term} r:#{@r} data:#{@data} mu:#{@mu} sigma:#{@sigma} c:#{@c}"
      s
end

log.debug isn't work.

# out_anomalydetect.rb
def load_from_file
...
            @outliers.each {|outlier| outlier.log = log } # @log is not dumped, so have to set at here
...
end

The reason why @outliers is nested hash(outlier isn't Fluent::ChangeFinder).

@outliers dump:

{:all=>{nil=>#<Fluent::ChangeFinder:0x007f2c3c08f628 @term=28, @r=0.05, @data=[...]>}}

This Pull Request is fixed assign the Fluent::Log to Fluent::ChangeFinder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant