JoaoJandre commented on code in PR #9330:
URL: https://github.com/apache/cloudstack/pull/9330#discussion_r1664476044


##########
plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/manager/ScaleIOSDCManagerImpl.java:
##########
@@ -51,7 +52,7 @@
 
 @Component
 public class ScaleIOSDCManagerImpl implements ScaleIOSDCManager {
-    private static final Logger LOGGER = 
Logger.getLogger(ScaleIOSDCManagerImpl.class);
+    private static final Logger logger = 
LogManager.getLogger(ScaleIOSDCManagerImpl.class);

Review Comment:
   Is there any particular reason that the logger should be static and final?
   
   Declaring it `static` means that the logger relates to the type, not the 
instance, since we use singletons for most classes (including this one), and 
therefore we always have an instance when calling methods from 
`ScaleIOSDCManagerImpl`, I don't see a reason that the logger should be static.
   
   Declaring it `final` means that we cannot change it after the initial 
assignment, I can see a reason why we would want this for loggers, but if it is 
not final, a test class that wants to test something with the logger can mock 
it easily, for example.



-- 
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: commits-unsubscr...@cloudstack.apache.org

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

Reply via email to