|
|
This rule detects the imported package or use of the object,
weblogic.logging.NoneCatalogLogger.
In the source scanner, the quick fix replaces 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");
In the source scanner, the quick fix replaces 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
are replaced with logger.log(WsLevel).
You can select the level you want from the Analysis Configuration dialog box.
- 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");