clebertsuconic commented on code in PR #4237:
URL: https://github.com/apache/activemq-artemis/pull/4237#discussion_r983697391
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/sasl/scram/SCRAMServerSASLFactory.java:
##########
@@ -44,14 +44,16 @@
import org.apache.activemq.artemis.spi.core.security.scram.UserData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.lang.invoke.MethodHandles;
/**
* abstract class that implements the SASL-SCRAM authentication scheme,
concrete implementations
* must supply the {@link SCRAM} type to use and be register via SPI
*/
public abstract class SCRAMServerSASLFactory implements ServerSASLFactory {
- private final Logger logger = LoggerFactory.getLogger(getClass());
+ private static final Logger logger =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Review Comment:
I think it was an error to do it this way. When we look for log.debug,
mixing instance versus class makes it fairly difficult to differentiate
I think we should keep it as static final class
think about it: you are looking over a log.debug(); the logger reports the
wrong class name, and you can't find it...
it was definitely a mistake.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]