eclipse-packaging / packages

Eclipse IDE product definitions.
Eclipse Public License 2.0
4 stars 11 forks source link

Lot's of DEBUG output with 2023-09 packages and p2 directory application #65

Closed guw closed 5 months ago

guw commented 11 months ago

Steps to repeat:

  1. Download Eclipse package (tried with eclipse-jee)
  2. Extract
  3. Run:
  ./eclipse 
     -nosplash 
     -application org.eclipse.equinox.p2.director 
     -repository https://download.eclipse.org/tm4e/releases/latest/
     -destination $(pwd)
     -installIU org.eclipse.tm4e.feature.feature.group

There is now lot's of debug out like:

Sep 28, 2023 12:04:29 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic
Sep 28, 2023 12:04:29 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic
...
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> GET /tm4e/releases/latest/p2.index HTTP/1.1
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> GET /tm4e/releases/latest/p2.index HTTP/1.1
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Cache-Control: max-age=0
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Cache-Control: max-age=0
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> User-Agent: p2/1.4.100.v20230630-1506 (Java 17.0.8.1+1 Eclipse Adoptium; MacOSX 13.5.2 x86-64; en_US) org.eclipse.epp.package.jee.product/4.29.0.20230907-1200 (org.eclipse.equinox.p2.director)
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> User-Agent: p2/1.4.100.v20230630-1506 (Java 17.0.8.1+1 Eclipse Adoptium; MacOSX 13.5.2 x86-64; en_US) org.eclipse.epp.package.jee.product/4.29.0.20230907-1200 (org.eclipse.equinox.p2.director)
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Accept-Encoding: gzip, x-gzip, deflate
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Accept-Encoding: gzip, x-gzip, deflate
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Host: download.eclipse.org
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Host: download.eclipse.org
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Connection: keep-alive
12:04:39.550 [Worker-2: https://download.eclipse.org/tm4e/releases/latest/p2.index] DEBUG org.apache.hc.client5.http.headers -- http-outgoing-5 >> Connection: keep-alive
...

It looks like full HTTP transfer data is being logged.

guw commented 11 months ago

@HannesWell Do you happen to know if I can supply a system property to silence the DEBUG log output? I suspect that the M2E Logback configuration is not getting applied in this mode.

guw commented 11 months ago

I think I found a workaround:

cat > $(pwd)/logback.xml <<EOF
<configuration>
  <root level="off" />
</configuration>
EOF

and then later:

./eclipse 
     -nosplash 
     -application org.eclipse.equinox.p2.director 
     ...
     -vmargs -Dlogback.configurationFile=$(pwd)/logback.xml

However, it would be nice if changes like aren't introduced. We have scripts for automatted/unattended installations and the additional log output breaks the parsing.

I still see:

OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Sep 28, 2023 12:54:30 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic
Sep 28, 2023 12:54:30 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic

But I suspect that's something that cannot be suppressed.

HannesWell commented 11 months ago

@HannesWell Do you happen to know if I can supply a system property to silence the DEBUG log output? I suspect that the M2E Logback configuration is not getting applied in this mode.

I'm not aware of one and didn't found one after a quick look at https://logback.qos.ch/manual/configuration.html, only those you already used to specify the file. Yes it could be possible that the m2e configuration is not applied in that usage scenario, but I never used it that way, so I'm not sure.

However, it would be nice if changes like aren't introduced.

From M2E side actually nothing changed as far as I can tell. The only thing that 'changed' is that the logging is now working. It could be (partially) broken in the previous release but it should have worked before.

In general it would probably help, if m2e would not supply a configuration, but would apply its changes required for the Maven Console on top of a configuration defined/supplied by the product respectively its creator in the usual ways. Then the main configuration is considered regardless of if the m2e.logback configuration is applied or not. I have suggested this already a few times, but didn't have the time yet to implement that.

HannesWell commented 11 months ago

I still see:

OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Sep 28, 2023 12:54:30 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.servlet.LogbackServletContainerInitializer of service jakarta.servlet.ServletContainerInitializer in bundle ch.qos.logback.classic
Sep 28, 2023 12:54:30 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic

That's right. This is print-out from Apache Aries, the Service Loader Mediator Spec implementation used for the Eclipse-Platform. If I complete https://github.com/eclipse-equinox/equinox/pull/295 one day, we can probably drop that.

merks commented 5 months ago

This does not appear to be an issue that can be addressed by the Eclipse Package Project itself.