I did some research and found that there is a log in the /private/var/ in which we can get the battery log. But unfortunately the iphone apps doesn't have read access to that file.
So I was wondering how the "Battery Log" works? (Battery Log is a app in the app store. It can display the battery history usage)