class Fluent::Plugin::LocalStorage
def load
def load return if @on_memory return unless File.exist?(@path) begin json_string = open(@path, 'r:utf-8'){ |io| io.read } json = Yajl::Parser.parse(json_string) unless json.is_a?(Hash) log.error "broken content for plugin storage (Hash required: ignored)", type: json.class log.debug "broken content", content: json_string return end @store = json rescue => e log.error "failed to load data for plugin storage from file", path: @path, error: e end end