A OS X battery logger based on batlog