Given the positive feedback from previous post we will continue to work further on with the ODM API and discover new possibilities and features to implement in our Rule projects. In this tutorial we will see how to create a custom log file, focusing on obtaining the values from Deployments of Decision Services within the Business Console.
To understand the basics of the IBM ODM, please refer to my previous post about the IBM ODM API here.
- Creating a custom log file
- In our Java ODM API project let’s create a global variable to define the output file.
- Now create a constructor method to add the values you want in your custom log file. In this example we are obtaining the deployment time stamp when a business user deploys a Decision Service from the Business Console:
- Tip: Remember we need to throw an IOException class for our constructor.
- We can continue adding the values we require in our outfile variable. In this code example we are getting the following values:
- Tip: Remember to format the log file with methods like newLine() and flush().
- Now we need to repackage and reinstall the teamserver.ear with our custom jar file and it will automatically start generating the log file when we make a Decision Service deployment. I will make a post explaining this process in detail in the future.
- In our Java ODM API project let’s create a global variable to define the output file.
If we did not specify an output location for the log file you will find it in <Your WAS Installation Path>\logs. I hope you enjoy this tutorial it helps you, please feel free to contact me with any feedback or questions! Thank you!
Oh my goodness! an incredible article dude. Thanks Nonetheless I’m experiencing subject with ur rss . Don know why Unable to subscribe to it. Is there anyone getting similar rss drawback? Anyone who knows kindly respond. Thnkx
Hi, I am glad the blog is being useful to you. About the subscription, you should be able to email subscribe with and without a wordpress account but try login to wordpress.com first and subscribe again, maybe it works. Thank you!