Pages

Thursday, March 6, 2014

ADF Logging Explained Chapter 2

Logging in ADF Application

 
For ADF Logging Explained Chapter 1, click here. This post describes Logging Levels.

Why there is need to learn Logging levels ?
When adding logger to Oracle Diagnostic Logging, there is option to define the loggingLevel for that Logger. Switching the logging Level in Oracle Diagnostic Logging for our custom Logger, you can control the level of details logged. Too much of logging can also cause performance issue. Decision of logging an information is taken based on the intValue comparision ( more details explained in later section ).


 A logging Level is defined using name,intValue and resourceBundleName. The resource bundle name to be used in localizing the level name so for now we will focus on name and intValue. There are some predefined Levels mentioned in java.util.logging.Level class.
 
LOG LEVEL NAME INT VALUE
OFF OFF INTEGER.MAX_VALUE
SEVERE SEVERE 1000
WARNING WARNING 900
INFO INFO 800
CONFIG CONFIG 700
FINE FINE 500
FINER FINER 400
FINEST FINEST 300
ALL ALL Integer.MIN_VALUE
 
Other logging Level types are custom levels defined using java.util.logging.Level with new name and API. 

Logging Levels defined in ADFLogger :

LOG LEVEL NAME INT VALUE
INTERNAL_ERROR INTERNAL_ERROR 1100
ERROR SEVERE 1000
WARNING WARNING 900
NOTIFICATION INFO 800
TRACE FINE 500
 
Other Logging Levels :
A) ODL Log Level
B) JAVA Log Level
C) Weblogic Server

 
 Here is detailed list of different logging levels and there comparision :



ODLWebLogic ServerJava
OFFOFF2147483647 - OFF
INCIDENT_ERROR:1(EMERGENCY)1100
INCIDENT_ERROR:4EMERGENCY1090
INCIDENT_ERROR:14ALERT1060
INCIDENT_ERROR:24CRITICAL1030
ERROR:1(ERROR)1000 - SEVERE
ERROR:7ERROR980
WARNING:1WARNING900 - WARNING
WARNING:7NOTICE880
NOTIFICATION:1INFO800 - INFO
NOTIFICATION:16(DEBUG)700 - CONFIG
TRACE:1(DEBUG)500 - FINE
TRACE:1DEBUG495
TRACE:16(TRACE)400 - FINER
TRACE:32(TRACE)300 - FINEST
TRACE:32TRACE295



Now you know about different available logging Level Types and their values. It is very much clear from the level names ALL and OFF that more and more detailed logging will happen with decrease in logging level int Value.