Sha256: 533d776fa153fcd8b0576649df0565f459352734b5b6c755b07ce1747e35e46e

Contents?: true

Size: 1.16 KB

Versions: 99

Compression:

Stored size: 1.16 KB

Contents

require_relative 'timelineManager'
require_relative 'util'

class FyipeListener
    def initialize(eventId, options)
        # start the timeline manager
        @timelineObj = FyipeTimelineManager.new(options)
        @currentEventId = eventId
        @utilObj = Util.new(options)
    end

    def logErrorEvent(content, category = 'exception')
        timelineObj = {}
        timelineObj["category"]= category
        timelineObj["data"]= content
        timelineObj["type"]= @utilObj.getErrorType('ERROR')
        timelineObj["eventId"]= @currentEventId

        # add timeline to the stack
        @timelineObj.addToTimeline(timelineObj)
    end

    def logCustomTimelineEvent(timelineObj)
        timelineObj["eventId"] = @currentEventId

        # add timeline to the stack
        @timelineObj.addToTimeline(timelineObj)
    end

    def getTimeline()
        # this always get the current state of the timeline array
        return @timelineObj.getTimeline()
    end

    def clearTimeline(eventId)
        # set a new eventId
        @currentEventId = eventId
        # this will reset the state of the timeline array
        return @timelineObj.clearTimeline()
    end
    
end

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
fyipe-3.0.14476.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14419.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14400.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14394.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14342.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14281.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14267.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14235.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14233.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14202.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14151.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14140.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14114.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14104.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14102.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14100.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14089.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14087.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14054.pre.qa lib/fyipe/fyipeListener.rb
fyipe-3.0.14051.pre.qa lib/fyipe/fyipeListener.rb