Do not use WebLogic WLLevel object

This rule detects the use of setLevel(WLLevel) method invocation on a logger object. The automated fix that will be provided will replace the WLLevel parameter with WsLevel and replaces the level value as well. You can customize the level value from the Analysis Configuration dialog.

The following cases are detected:
  1. logger.setLevel(WLLevel.ALERT);
  2. logger.setLevel(WLLevel.CRITICAL);
The automated fix will replace the WLLevel with WsLevel and changes the level to the user preference as specified in the Analysis Configuration dialog. For the previous examples, the automated fix will change the code to:
  1. logger.setLevel(WsLevel.SEVERE);
  2. logger.setLevel(WsLevel.SEVERE);

The WsLevel is defined in IBM(R) class, com.ibm.websphere.logging.WsLevel. If there is an import statement in the class for this object, then the WsLevel is used. Otherwise, the fully qualified name is used, for example: logger.setLevel(com.ibm.websphere.logging.WsLevel.SEVERE);

.