Do not use WebLogic LoggingHelper object to get logger instance.

This rule detects the use of weblogic.logging.LoggingHelper to obtain a logger. The automated fix will replace the call to obtain a logger from weblogic.logging.LoggingHelper with a call to obtain a logger from java.util.Logger.


The following cases are detected:
  1. The use of the LoggerHelper to obtain a server logger:
    Logger serverlogger = LoggingHelper.getServerLogger();
  2. The use of the LoggerHelper to obtain a client logger:
    Logger clientlogger = LoggingHelper.getClientLogger();
  3. The use of the LoggerHelper to obtain a Domain Logger example:
    Logger domainlogger = LoggingHelper.getDomainLogger();

Manual Solution:
First you will need to replace the LoggingHelper with java.util.Logger.
For the previous examples, assuming the class name is MyTest, The automated fix will produce the following results:


Logger serverlogger = Logger.getLogger(MyTest.class.getName());
Logger clientlogger = Logger.getLogger(MyTest.class.getName());
Logger domainLogger = Logger.getLogger(MyTest.class.getName());



The MyTest class might not already contain an import statement for the logger; for example: In this case, the modification is qualified as: