-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P5
-
None
-
Affects Version/s: 7
-
Component/s: core-libs
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
As there are several Logging framewors (log4j, logback, java logging), it would be nice to have a Logger interface which contains all the default logging methods.
JUSTIFICATION :
This will help our code to be independent of the logging framework being used, as long as it is injected @ runtime to the application.
Specially helpful when we are using libraries from different applications to construct one function.
This interface has to be in java.util.logging only, so that it can be commonly implemented by all the logging frameworks.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For example if the Logger interface is available... In my code I would
java.util.loggin.LoggerInterface logger = MyLoggerFactory.getLogger("");
The LoggerFactory then can return a specific logger that is being used in the enterprise.
ACTUAL -
Depending on the logger being used, we need to modify the code to
import the logger classes.
---------- BEGIN SOURCE ----------
Our application uses logback as the logging framework, and we have to use another company libraries which depended on log4j, so we had to change the code to suit our requirements.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
modify code or use reflection.
As there are several Logging framewors (log4j, logback, java logging), it would be nice to have a Logger interface which contains all the default logging methods.
JUSTIFICATION :
This will help our code to be independent of the logging framework being used, as long as it is injected @ runtime to the application.
Specially helpful when we are using libraries from different applications to construct one function.
This interface has to be in java.util.logging only, so that it can be commonly implemented by all the logging frameworks.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
For example if the Logger interface is available... In my code I would
java.util.loggin.LoggerInterface logger = MyLoggerFactory.getLogger("");
The LoggerFactory then can return a specific logger that is being used in the enterprise.
ACTUAL -
Depending on the logger being used, we need to modify the code to
import the logger classes.
---------- BEGIN SOURCE ----------
Our application uses logback as the logging framework, and we have to use another company libraries which depended on log4j, so we had to change the code to suit our requirements.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
modify code or use reflection.