Hi, does anyone have an example of an Appendable that I could use to help my debug logging? The problem I often run into is that my application (a test framework) has multiple Expect instances running in separate threads, and when I have them echo their stdout and stderr, I can't figure out which output came from which thread. So I'd like to prepend that output with the thread name or some other string to help troubleshooting.
I would use this Appendable with this, on my ExpectBuilder:
withEchoOutput(Appendable echoOutput)
For example, instead of this...
?[32mUsing /home/paasusr/.rvm/gems/ruby-2.2.6?[0m
?[32mUsing /home/paasusr/.rvm/gems/ruby-2.2.6?[0m
I'd like this...
[thread1-stdout] Last login: Thu Jan 25 01:51:11 2018 from brmopc-x5-2l-7.us.oracle.com [thread2-stdout] ?[32mUsing /home/paasusr/.rvm/gems/ruby-2.2.6?[0m
[thread1-stdout] ?[32mUsing /home/paasusr/.rvm/gems/ruby-2.2.6?[0m
Any advice?
Thanks,
Todd.