You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/07/05 17:43:11 UTC

[GitHub] [httpcomponents-client] carterkozak opened a new pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

carterkozak opened a new pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236


   Note that this may change the origin of logging when classes
   have been subclassed, as the logger origin will use the class
   name that defined the logger where previously the subclass type
   would be used. In scenarios where external libraries subclass
   httpclient utilities this allows httpclient logging to maintain
   the `org.apache.hc` prefix instead of inheriting arbitrary
   subclass names.
   
   Using some logging frameworks this may result in reduced churn
   when httpclient components are created (new connections, for example)
   because loggers are looked up once per class.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
ok2c commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653938731


   @carterkozak  @carterkozak  I would rather prefer SCREAMING_SNAKE_CASE 


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
ok2c commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653941501


   @carterkozak All static loggers should be consistently upper case in my opinion.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] carterkozak commented on a change in pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
carterkozak commented on a change in pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#discussion_r450263910



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/ssl/SSLConnectionSocketFactory.java
##########
@@ -266,13 +266,13 @@ public Socket createLayeredSocket(
             sslsock.setEnabledCipherSuites(TlsCiphers.excludeWeak(sslsock.getEnabledCipherSuites()));
         }
 
-        if (this.log.isDebugEnabled()) {
-            this.log.debug("Enabled protocols: {}", Arrays.asList(sslsock.getEnabledProtocols()));
-            this.log.debug("Enabled cipher suites:{}", Arrays.asList(sslsock.getEnabledCipherSuites()));
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Enabled protocols: {}", Arrays.asList(sslsock.getEnabledProtocols()));
+            LOG.debug("Enabled cipher suites:{}", Arrays.asList(sslsock.getEnabledCipherSuites()));

Review comment:
       Now that we're using slf4j interpolation, logging the `String[]` directly without wrapping should be fine. Missing a space after the colon.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c merged pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
ok2c merged pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] carterkozak commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-654251130


   Sounds good to me, I'll update the names :-)


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653925488


   @ok2c @garydgregory Any opinion on the case of static finals?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] carterkozak commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653939917


   @ok2c to clarify do you mean for special named loggers, or all loggers?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653919390


   Shouldn't the variables now now be in uppercase and with underscores to resolve camel case?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-654033242


   Same here.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] carterkozak commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-653921508


   I think most projects use `log` (lower case) even for static loggers, however the loggers with special names (not `log`) could probably go either way. I can update those to use SCREAMING_SNAKE_CASE if you prefer.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
ok2c commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-654351999


   Shall merge this PR into master or 5.1?


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] carterkozak commented on pull request #236: HTTPCLIENT-2096: Migrate instance loggers to static fields

Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #236:
URL: https://github.com/apache/httpcomponents-client/pull/236#issuecomment-654835370


   I defer do your judgement. Thanks for the reviews!


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org