Is your feature request related to a problem? Please describe.
It is possible for the JVM to output warnings using their "Unified Logging" framework.
For example, when using Java 17, if there are duplicate 'cpuset controllers' you will see a warning about that:
[0.001s][warning][os,container] Duplicate cpuset controllers detected. Picking /sys/fs/cgroup/cpuset, skipping /host/sys/fs/cgroup/cpuset.
openjdk version "17.0.3" 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-nixos)
OpenJDK 64-Bit Server VM (build 17.0.3+7-nixos, mixed mode, sharing)
Unfortunately, by default, these warnings are printed to stdout. This means when protoc tries to parse the output of a JVM-based protoc plugin, and the JVM prints such a warning, the output is invalid and you will get a "Plugin output is unparseable" error.
Describe the solution you'd like
I would like the default JVM startup scripts (created by ProtocPluginAssembler) to, by default, invoke the JVM with the extra JVM options: -Xlog:disable -Xlog:all=warning:stderr -Xlog:all=error:sterr. -Xlog:disable should stop it from printing warnings to stdout, and -Xlog:all=warning:stderr should AFAICS cause it to print warnings to stderr. In practice unfortunately my JDK17 doesn't actually print them to stderr, but that seems to be a bug on the JVM side and I'm not sure we should care about it.
Is your feature request related to a problem? Please describe.
It is possible for the JVM to output warnings using their "Unified Logging" framework.
For example, when using Java 17, if there are duplicate 'cpuset controllers' you will see a warning about that:
Unfortunately, by default, these warnings are printed to stdout. This means when protoc tries to parse the output of a JVM-based protoc plugin, and the JVM prints such a warning, the output is invalid and you will get a "Plugin output is unparseable" error.
Describe the solution you'd like
I would like the default JVM startup scripts (created by ProtocPluginAssembler) to, by default, invoke the JVM with the extra JVM options:
-Xlog:disable -Xlog:all=warning:stderr -Xlog:all=error:sterr
.-Xlog:disable
should stop it from printing warnings to stdout, and-Xlog:all=warning:stderr
should AFAICS cause it to print warnings to stderr. In practice unfortunately my JDK17 doesn't actually print them to stderr, but that seems to be a bug on the JVM side and I'm not sure we should care about it.