I am trying to automate the Eclipse guide on mirroring repositories with p2 with some simple steps:
Download an Ecplise distribution using
curl(e.g., eclipse-java-2024-09-R-linux-gtk-x86_64.tar.gz)Unpack the downloaded eclipse.tar.gz
Execute the two mirroring commands (metadata and artifacts):
./eclipse -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://download.eclipse.org/eclipse/updates/4.17/ -destination /tmp/eclipse_2020-09 ./eclipse -nosplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source https://download.eclipse.org/eclipse/updates/4.17/ -destination /tmp/eclipse_2020-09
Unfortunately, this creates gigabytes of DEBUG output! Tons of stuff like this:
[Worker-0: File Transport Reader] DEBUG org.apache.hc.client5.http.wire -- http-outgoing-227 <<
"[0xffffff97]tC[0xffffffb5][0xffffffc7][0xffffffe5][0xfffffff6][0xffffffc2]x[0xfffffff6]3
[0xffffffd5]G[0xfffffffd]*[0xfffffff0]"[0xffffff88][0xffffffab][0xffffff97][0x1][0xffffffba][0x5]
[0xffffff92]YX'[0x1f][0x17]'xq[0xffffffc1][0xffffffa4][0xffffffb3];~[0xffffffee][0x14]v ...
I tried adding flags like -Dlog4j.logger.org.apache=ERROR or -Dorg.apache.log.level=INFO and many others that I found online, but nothing helped quieting down the logging.
How can I stop all these DEBUG messages? There must be a simple quiet flag or something, no?
1 Answer 1
Eclipse uses the Logback logging framework: https://logback.qos.ch/
You have to create a simple logging configuration file (e.g. logback.xml) in order to turn off logging:
<configuration>
<root level="OFF"/>
</configuration>
To reference this file with the system property logback.configurationFile on the command line, use the -vmargs argument. This option must come at the end of the command line:
./eclipse -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source https://download.eclipse.org/eclipse/updates/4.17/ -destination /tmp/eclipse_2020-09 -vmargs -Dlogback.configurationFile=logback.xml
tycho-p2-extras-plugin. For an examplepom.xmlhow to do this, see here the first part which should also work with the latest Tycho version (only for old-style update sites use Tycho 3.0.5).