Getting the log messages from a failed query

I’d like to capture the errors from an PROOF run so they can be propagated back up the stack in a “nice” way when there is a query failure. When I run I see the following printed out to stdout:

Setting up worker servers: OK (4 workers)
PROOF set to parallel mode (4 workers)
Info in TProofPlayerRemote::SendSelector: header file not found: tried: queryTestSimpleQuery.h queryTestSimpleQuery.hh

That last line is the obvious error, and I’d like to capture it somehow. I was trying to use the TProof::GetLastLog(), but that returns null in this case. I suspect this error is local, not remote, and that is why. Is there a way to capture this?

And for errors that happen at the PROOF end, is this GetLastLog the right thing to do?

Many thanks!

Cheers, Gordon.

Ok, what I’m doing after some hunting around is using this GetLastLog to get the messages that come over the wire. I am also using the proof manager to get the session logs when I detect an actual error - so all of that gets captured in an exception when something goes wrong with PROOF. So far this seems to have trapped most of the errors I’m obvserving.