Custom env profile for SLF4J parametrization - ArnaudGarnierCAST/com.castsoftware.uc.slf4j.param GitHub Wiki

# Description Simple Logging Facade for Java (SLF4J) is a popular JEE framework for logging. See reference at [Simple Logging Facade for Java (SLF4J)](http://www.slf4j.org/) This extension provides an **Environment Profile export file (.aex)** for this popular logging framework. AIP 7.0.x to 8.2.0 provides support for Java Logging API (java.util.logging, JUL), Log4j and Apache Commons Logging APIs, but not for SLF4J. This environment profile fills the gap. This Environment Profile contains parametrization rules focusing on Logger API, for the most common methods signature. Methods using Marker are not yet configured in the env profile.

In what situation should you install this extension?

When your Java application uses SLF4J as logging framework. This can be detected:

  • Before analysis :
    • from the application survey

    • from the presence of JAR, for instance : slf4j-api-1.7.5.jar

    • from the presence of slf4j-api dependency in Maven pom.xml file

      <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency>

    • from the presence of following import in .java source files:

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

  • After analysis :
    • from presence in Analysis Service of external class and methods from package org.slf4j org.slf4j.Logger.debug or org.slf4j.Logger.info or org.slf4j.Logger.warn ...

SLF4J version support

All versions of SLF4j are supported, from 1.0 to 1.7.x.

CAST AIP compatibility

All AIP versions AIP 7.0.x to 8.2.0 are supported

Installation instructions

  • Import : Edit Analysis Service, and use tab Environment Profile / Import... to import the .aex file provided here.
  • Add this custom environment profile at Application level :
    • Edit Application
    • go to Frameworks panel
    • in Custom J2EE Environment profiles, click Add..., and select the SLF4J env profile in the list.

What results can you expect?

These parametrization rules will prevent External Link engine (grep tool) to draw Use links towards DB objects whose name are found in argument's strings. This will avoid to overcrowd the list of dynamic links the AI admin has to validate in DLM (Dynamic Link Manager).

Limitations

Current version does not parametrize logger methods decorated with Marker data (using the Marker parameter). They can be added at will.

⚠️ **GitHub.com Fallback** ⚠️