Use stdout for the resulting PDF (so we don't have to write to the hosting server's storage).
For same reason the is also of same importance.
In general every output that will otherwise find it's way into the target file.
Helptext and utility commands output can keep stdout. But error and verbose messages that arise while creating an output must use stderr.
To summarise the above, and offline discussions, I propose to:
Use stdout for helptext and utility commands output
Use stderr for anything else
In order to deal with usage of stdout by embedded code (such as JasperSoft) as per JAS-122, the "fill()" logic will be wrapped in a try-finally block which redirects stdout to stderr.
Here is the in-progress code https://bitbucket.org/ShaheedHaque/jasperstarter/commits/branch/jas-97_support_stdout. This presently includes all the code needed to avoid using stdout, but not the actual redirect of report output. Comments welcome...
It works great and solves the problem with additional libs like chart customizer too.
Great, thanks. I almost have the actual redirect logic working. The problem is that it seems that in the test environment, stderr and stdout are already redirected to the same place. So I need to rework the current test, and then derive the new test using the result of the current test. Watch this space.