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/10/22 18:57:08 UTC

[GitHub] [maven-dependency-analyzer] Koziolek opened a new pull request, #71: [MSHARED-1149] – Replace System.out by logger

Koziolek opened a new pull request, #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71

   Replace usage of `System.out.println` by Logger from slf4j. 
   Introducing slf4j in similar way like other MSHARED projects like maven-filtering
   
    - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
   


-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1492592044

   @Koziolek `Slf4j` will be ok for me. So we can return to first commit.


-- 
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-dependency-analyzer] Koziolek commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
Koziolek commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1300675875

   Ok, I found this » https://maven.apache.org/maven-logging.html
   
   > We have reached the decision that [SLF4J](http://slf4j.org/) is the best option for a logging API: SLF4J has reached a certain level of ubiquity and while SLF4J may not be perfect, it's the de facto standard and it's pointless to try and remake another one.
   > …
   > The standard Maven distribution, from Maven 3.1.0 onward, uses the [SLF4J API](https://www.slf4j.org/apidocs/) for logging combined with the [SLF4J Simple](https://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html) implementation. Future versions may use a more advanced implementation, but we chose to start simple.
   
   So… First solution looks OK. 
   


-- 
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-dependency-analyzer] elharo commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
elharo commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1301105269

   The info you found was written 10+ years ago and predates log4shell. It might even go as far back as a time when Maven supported Java 1.3.
   
   If these logs are still visible with -q, then that's a bug that should be fixed, not a reason to add new dependencies we don't need.


-- 
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-dependency-analyzer] elharo commented on a diff in pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
elharo commented on code in PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#discussion_r1002735103


##########
pom.xml:
##########
@@ -95,6 +96,12 @@
       <version>9.3</version>
     </dependency>
 
+    <dependency>

Review Comment:
   Ick, no. Can we please stop adding third party logging libraries willy nilly. java.util.logging should be all we need. 



-- 
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-dependency-analyzer] slachiewicz commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
slachiewicz commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1301281631

   Maven simply supports only slf4j based logging and nothing else: https://github.com/apache/maven/blob/maven-3.9.x/maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties


-- 
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-dependency-analyzer] slawekjaranowski commented on a diff in pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#discussion_r1002737753


##########
pom.xml:
##########
@@ -95,6 +96,12 @@
       <version>9.3</version>
     </dependency>
 
+    <dependency>

Review Comment:
   This library is used in Maven plugins ... so does Maven support `java.util.logging`?
   
   For me discusion is still open - we can try one again find gold way for logging on dev list.



-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1301311704

   As I wrote early, I feel we need discus it again.
   For case as java util logging we need a bridge from jul to slf4j.


-- 
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-dependency-analyzer] slawekjaranowski commented on a diff in pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#discussion_r1011583444


##########
pom.xml:
##########
@@ -95,6 +96,12 @@
       <version>9.3</version>
     </dependency>
 
+    <dependency>

Review Comment:
   @elharo @Koziolek 
   My question is still open how java logging will be supported by Maven?
   



-- 
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-dependency-analyzer] elharo commented on a diff in pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
elharo commented on code in PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#discussion_r1002744101


##########
pom.xml:
##########
@@ -95,6 +96,12 @@
       <version>9.3</version>
     </dependency>
 
+    <dependency>

Review Comment:
   Third party logging frameworks haven't been needed since Java 1.4. Post log4shell I have no remaining patience for external dependencies that simply duplicate what's already in the JDK. The specific printlns being replaced here can be handled by java.util.logging, and any plugins using other frameworks should be corrected. 



-- 
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-dependency-analyzer] slawekjaranowski commented on pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#issuecomment-1300524844

   I did a test, I added t oa plugin code:
   
   ```
           logger.info( "Log info 1  from Java utils" );
           logger.info( "Log info 2  from Java utils" );
           logger.fine( "Log fine from Java utils" );
   ```
   
   And I see:
   
   ```
   Nov 02, 2022 3:19:10 PM org.apache.maven.plugins.install.InstallMojo execute
   INFO: Log info 1  from Java utils
   Nov 02, 2022 3:19:10 PM org.apache.maven.plugins.install.InstallMojo execute
   INFO: Log info 2  from Java utils
   ```
   
   even I execute build with `-q` logs still is visible
   
   Next logging in `fine` level never is displayed - even with `-X`
   
   For my perspective `Java util logging` is similar as `System.out` ... in Maven plugin environment - no control what and how is displayed.
   


-- 
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-dependency-analyzer] Koziolek commented on a diff in pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by GitBox <gi...@apache.org>.
Koziolek commented on code in PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71#discussion_r1011534616


##########
pom.xml:
##########
@@ -95,6 +96,12 @@
       <version>9.3</version>
     </dependency>
 
+    <dependency>

Review Comment:
   @elharo done. I removed slf4j and Java Core Logger is in use now. 



-- 
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-dependency-analyzer] slawekjaranowski merged pull request #71: [MSHARED-1149] – Replace System.out by logger

Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski merged PR #71:
URL: https://github.com/apache/maven-dependency-analyzer/pull/71


-- 
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