You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/08/03 07:51:12 UTC

[GitHub] [maven-mvnd] findepi opened a new issue, #671: Logs go to stdout breaking scripts

findepi opened a new issue, #671:
URL: https://github.com/apache/maven-mvnd/issues/671

   Following https://github.com/apache/maven-mvnd/issues/513#issuecomment-959520767 and https://github.com/apache/maven-mvnd/issues/604, i use `mvnd` in a script like this
   ```
   project_version=$(mvnd -B help:evaluate -Dexpression=pom.version -q -DforceStdout --raw-streams -Dmvnd.logPurgePeriod=999999d)
   ```
   
   but then
   ```
   $ echo $project_version
   09:43:29.312 [main] DEBUG org.mvndaemon.mvnd.client.DefaultClient - Starting client 09:43:29.359 [main] DEBUG org.mvndaemon.mvnd.common.DaemonRegistry - loading own PID from VM name: 37085 09:43:29.386 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 1 idle daemons, 1 compatibles 09:43:29.387 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connecting to Daemon 09:43:29.387 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:53036. 09:43:29.404 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected to address /127.0.0.1:53036. 09:43:29.404 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Exchanged token successfully 09:43:29.408 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected 09:43:29.409 [main] DEBUG org.mvndaemon.mvnd.client.DaemonClientConnection - thread 1: dispatching class org.mvndaemon.mvnd.common.Message$BuildRequest 392-SNAPSHOT 09:43:29.517 [main] DEBUG org.mvndaemon
 .mvnd.client.DaemonClientConnection - thread 1: connection stop
   ```
   
   it seems that
   - mvnd logs DEBUG level by default to the console, which isn't useful for me as a user
   - the logs go to stdout (instead of stderr)
   
   
   I am observing the issue since I installed mvnd on a new laptop (Apple M1, Arm CPU)
   
   ```
   $ mvnd --version
   09:44:58.058 [main] DEBUG org.mvndaemon.mvnd.client.DefaultClient - Starting client
                                                                                                                                                                                                                            Looking up daemon...  time: 00:00daemon.mvnd.common.DaemonRegistry - loading own PID from VM name: 37260
   09:44:58.138 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 1 idle daemons, 1 compatibles
   09:44:58.138 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connecting to Daemon
   09:44:58.139 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:53036.
   09:44:58.156 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected to address /127.0.0.1:53036.
   09:44:58.156 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Exchanged token successfully
   09:44:58.159 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected
   mvnd 0.8.0 JVM client (2cfffe23eebac7a0fddecf0268478ae963a8859f)
   Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
   Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
   Maven home: /opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn
   Java version: 18.0.2, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/18.0.2/libexec/openjdk.jdk/Contents/Home
   Default locale: en_US, platform encoding: UTF-8
   OS name: "mac os x", version: "12.3", arch: "aarch64", family: "mac"
   09:44:58.166 [main] DEBUG org.mvndaemon.mvnd.client.DaemonClientConnection - thread 1: connection stop
   ```
   
   The logs show up irrespective of Java version I run on
   
   ```
   $ jenv shell 11
   
   $ mvnd --stop
   09:50:33.417 [main] DEBUG org.mvndaemon.mvnd.client.DefaultClient - Starting client
   09:50:33.485 [main] DEBUG org.mvndaemon.mvnd.common.DaemonRegistry - loading own PID from VM name: 39664
   Stopping 3 running daemons
   
   $ mvnd --version
   09:50:54.248 [main] DEBUG org.mvndaemon.mvnd.client.DefaultClient - Starting client
                                                                                                                                                                                                                            Looking up daemon...  time: 00:00daemon.mvnd.common.DaemonRegistry - loading own PID from VM name: 39745
   09:50:54.317 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 0 idle daemons, 0 compatibles
   09:50:54.317 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Found 0 busy daemons, 0 cancelled, 0 compatibles
   Starting new daemon 74a49ce7 (subsequent builds will be faster)...  time: 00:00ts from registry
   09:50:54.333 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Starting daemon process: id = 74a49ce7, workingDir = /Users/findepi/repos/trino, daemonArgs: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java -classpath /opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn/lib/ext/mvnd-common-0.8.0.jar:/opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn/lib/ext/mvnd-agent-0.8.0.jar -javaagent:/opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn/lib/ext/mvnd-agent-0.8.0.jar -Xmx8192m --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL
 -UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -Xmx5g -Dmvnd.home=/opt/homebrew/Cellar/mvnd/0.8.0/libexec -Dmaven.home=/opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn -Dmaven.conf=/opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn/conf -Dmvnd.java.home=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home -Dlogback.configurationFile=/opt/homebrew/Cellar/mvnd/0.8.0/libexec/conf/logback.xml -Dmvnd.id=74a49ce7 -Dmvnd.daemonStorage=/Users/findepi/.m2/mvnd/registry/0.8.0 -Dmvnd.registry=/Users/findepi/.m2/mvnd/registry/0.8.0/registry.bin -Dmvnd.socketFamily=inet -Dmvnd.home=/opt/homebrew/Cellar/mvnd/0.8.0/libexec -Djdk.java.options=--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Dmvnd.noDaemon=false -Dmvnd.debug=false -Dmvnd
 .idleTimeout=3h -Dmvnd.keepAlive=100ms -Dmvnd.extClasspath= -Dmvnd.coreExtensions=io.takari.aether:takari-local-repository:0.11.3 -Dmvnd.maxHeapSize=5g -Dmvnd.jvmArgs=-Xmx8192m --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -Dmvnd.enableAssertions=false -Dmvnd.expirationCheckDelay=10s -Dmvnd.duplicateDaemonGracePeriod=10s -Dmvnd.socketFamily=inet org.mvndaemon.mvnd.common.MavenDaemon
   09:50:54.340 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Started Maven daemon 74a49ce7
   09:50:55.367 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connecting to Daemon
   09:50:55.368 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Trying to connect to address /127.0.0.1:53340.
   09:50:55.390 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected to address /127.0.0.1:53340.
   09:50:55.390 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Exchanged token successfully
   09:50:55.397 [main] DEBUG org.mvndaemon.mvnd.client.DaemonConnector - Connected
   mvnd 0.8.0 JVM client (2cfffe23eebac7a0fddecf0268478ae963a8859f)
   Terminal: org.jline.terminal.impl.PosixSysTerminal with pty org.jline.terminal.impl.jansi.osx.OsXNativePty
   Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
   Maven home: /opt/homebrew/Cellar/mvnd/0.8.0/libexec/mvn
   Java version: 11.0.16, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
   Default locale: en_US, platform encoding: UTF-8
   OS name: "mac os x", version: "12.3", arch: "aarch64", family: "mac"
   09:50:55.694 [main] DEBUG org.mvndaemon.mvnd.client.DaemonClientConnection - thread 1: connection stop
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-mvnd] findepi commented on issue #671: Logs go to stdout breaking scripts

Posted by GitBox <gi...@apache.org>.
findepi commented on issue #671:
URL: https://github.com/apache/maven-mvnd/issues/671#issuecomment-1203610864

   Perhaps this duplicates https://github.com/apache/maven-mvnd/issues/656 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-mvnd] gnodet closed issue #671: Logs go to stdout breaking scripts

Posted by GitBox <gi...@apache.org>.
gnodet closed issue #671: Logs go to stdout breaking scripts
URL: https://github.com/apache/maven-mvnd/issues/671


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-mvnd] gnodet commented on issue #671: Logs go to stdout breaking scripts

Posted by GitBox <gi...@apache.org>.
gnodet commented on issue #671:
URL: https://github.com/apache/maven-mvnd/issues/671#issuecomment-1231259073

   Duplicate


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org