This PR implements the same functionality for AsciidoctorJ, pretty much the same way as the Ruby code (keeps track of highest seen log message severity, and checks that the end).
The default value is the same as in Ruby - only "fatal" severity causes non-zero exit code - which probably won't break many things (but someone running AsciidoctorJ as part of a CI build would probably want to fail on "error" severity as well, maybe even "warn").
Kind of change
Description
The Ruby asciidoc CLI has option --failure-level which forces the CLI to exit with non-zero status code if the specified logging level (severity) is reached. See: https://github.com/asciidoctor/asciidoctor/pull/2674, https://github.com/asciidoctor/asciidoctor/issues/2003, https://github.com/asciidoctor/asciidoctor/issues/854
This PR implements the same functionality for AsciidoctorJ, pretty much the same way as the Ruby code (keeps track of highest seen log message severity, and checks that the end).
The default value is the same as in Ruby - only "fatal" severity causes non-zero exit code - which probably won't break many things (but someone running AsciidoctorJ as part of a CI build would probably want to fail on "error" severity as well, maybe even "warn").
Issue
Fixes #1113