|
|
This rule detects the imported package or use of the object,
weblogic.logging.NoneCatalogLogger
.
The automated fix will replace the NonCatalogLogger with the Java logger and
replaces the NonCatalogLogger methods with methods in the Java
Logger.log(Level, message)
format.
You can customize the log level in the Analysis Configuration dialog.
|
-
Class instance creation; for example:
NonCatalogLogger nc = new NonCatalogLogger("SomeValue");
-
Method calls on the NonCatalogLogger; for example:
nc1.alert("Some Message");
When the automated fix becomes available it will replace the NonCatalogLogger call with calls to the
Java utility logger objects.
For the previous example:
Logger nc = new Logger("SomeValue");
nc1.log(WsLevel.SEVERE, "Some Message");
Notes:
- The NonCatalogLogger methods, such as alert, severe, warning, and so on
will be replaced with
logger.log(WsLevel)
.
- The WsLevel is defined in the IBM(R) class,
com.ibm.websphere.logging.WsLevel
.
If an import statement exists in the class for this object,
then WsLevel is used. Otherwise, the fully qualified name is used; for example:
nc1.log(com.ibm.websphere.logging.WsLevel.SEVERE, "Some Message");