Override LoggingProcessListener?

Hi,

I'm  developing a runner plugin, which extends BuildServiceAdapter and  everything seems to be working fine. My problem is that the executable  (which cannot be modified) outputs everything to stdout, and thus the  errors and warnings aren't shown in the overview page or sent in  notifications. I would like to parse the output, and send errors and  warnings to the appropriate place. I think what I need to do is override  the default LoggingProcessListener - however I'm not exactly sure where  to hook it in - trying to modify the List returned by getListeners()  always generates an exception. Any help would be appreciated.

Thanks,
Bart

1 comment
Comment actions Permalink

The right way is to implement new ProcessListener interface and handle output there.
The list that returned from getListeners() is readonly. To return additional listeners you may copy the list and add your listener(s) to the copied list. If you do not need default behaviour, you may simple return only your listener from getListeners()

0

Please sign in to leave a comment.