mardi 27 juillet 2021

How to read third-party console logs dynamically in code

I'm writing a Java app that uses a third-party library; this library emits useful warning messages to the console when things go wrong. So useful, in fact, that I'd like my code to act on them at the time they are produced (or shortly afterwards). Is this possible given the fact that I have no control over how the third-party library's logs are produced?

My best Googling has turned this up so far, which looks promising; but I don't know anything about PrintStream or whether the third-party library uses it for logging.

Is there some sort of equivalent to reflection whereby an application can process its own logs?





Aucun commentaire:

Enregistrer un commentaire