Use stdout for the resulting PDF (so we don't have to write to the hosting server's storage)

Description

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.

Environment

None

Activity

Show:
Volker Voßkämper
October 17, 2018, 6:53 PM

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.

Shaheed Haque
November 12, 2018, 10:02 AM

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.

Shaheed Haque
November 12, 2018, 12:33 PM

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...

Volker Voßkämper
November 12, 2018, 5:24 PM

It works great and solves the problem with additional libs like chart customizer too.

Shaheed Haque
November 12, 2018, 7:14 PM

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.

Fixed

Assignee

Volker Voßkämper

Reporter

balazs hideghety

Labels

None

Components

Fix versions

Priority

Major