Hi Guys today I am going to implement adf logging.
To create please follow the steps.
1. Create a java class and import "oracle.adf.share.logging.ADFLogger"
2. get the instance of Logger object.
public static ADFLogger logger = ADFLogger.createADFLogger(LoggerBean.class);\
3. write a java method and add some information to the logger object.
public String logging() {
logger.info("this is from logging bean");
// Add event code here...
return null;
}
4. Create a jspx page and call this method from the page by using action or what ever you want.
To create please follow the steps.
1. Create a java class and import "oracle.adf.share.logging.ADFLogger"
2. get the instance of Logger object.
public static ADFLogger logger = ADFLogger.createADFLogger(LoggerBean.class);\
3. write a java method and add some information to the logger object.
public String logging() {
logger.info("this is from logging bean");
// Add event code here...
return null;
}
4. Create a jspx page and call this method from the page by using action or what ever you want.
5. Logging Configuration in Oracle jDeveloper.
5.1. Keep the Server in running mode and go to the java class and select Actions from log window and select Configure Oracle Diagnostic Logging.
5.2 In Oracle Diagnostics Logging Configuration Click on + symbol and select Add Persistent Logger.
give the package name to which you want to give logging and click on OK
5.3. Go to Structure window and copy & paste one log_handler and change the name.
5.4. Goto Source Tab and change the file location i.e, path for this log_handler.
ex. <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/rajuOwn.log'/>
5.5 Go to Overview Tab and in Handler Declarations click on + Symbol. and select the log_handler (raju_hanlder) as we have created in the step 5.3.
6. Now run the jspx page and click on button you will get a file with the name "rajuOwn.log" at the location:
C:\Users\User Name\AppData\Roaming\JDeveloper\system11.1.1.6.38.61.92\DefaultDomain\servers\DefaultServer\logs
if you have any doubts feel free to reach me..
njy learning adf.
No comments:
Post a Comment