Coul'd you please ask me, who used storm IEventLogger interface for logging event values. I can't understand, how it use in Some custom java application. It will use some thread or with thread of applcation? How we need to get/set storm config and TopologyContext ... etc. http://storm.apache.org/releases/1.0.3/Eventlogging.html (Extending eventlogging)
1 Answers
You can register it in your Config when you're setting up your topology. https://github.com/apache/storm/blob/80cc88112bf4fab34571ebff03782b759d112288/storm-core/src/jvm/org/apache/storm/Config.java#L2412
Edit: To provide a little more detail, your event logger will run as part of the EventLoggerBolt (https://github.com/apache/storm/blob/1.x-branch/storm-core/src/jvm/org/apache/storm/metric/EventLoggerBolt.java) that Storm automatically adds to your topology if you've set topology.eventlogger.executors to a non-0 value. As you can see, the bolt will call the prepare method on your event logger, so you'll have a chance to get the topology config and context from there.
Edit 2: I noticed that you're using Storm 1.0.3. You'll need to upgrade to a later Storm version, the methods I referenced don't exist in that version.

- 3,621
- 2
- 7
- 7