Capture stderr from build command and optionally route to Antora logger
Instead of just printing stderr lines to the console, that output should be captured so it can be integrated with Antora. One such use case is to map the Asciidoctor log messages to the Antora logger.
I propose adding a new key named stderr under the build key. This new key accepts the following values:
- print - stream to stderr, as it works today
- ignore - send the stderr lines to /dev/null
- buffer - store the stderr lines on the export file object (perhaps using the property
messages); we may need a model such as{ text, source, time } - log - route to the Antora logger; if the line is in jsonl format, the data from that object will be used to log the appropriate time, level, message, etc; otherwise, log at the error level
It's unclear whether the responsibility should be on the converter or on the assembleContent function. I'd say that it could be either. If the converter returns the result of runCommand, this will be done by assembleContent. Otherwise, it is assumed that it will be handled by the converter itself. We'll let experimentation and experience be our guide.