add log api
Merge branch 'lite-spike' of github.com:smelt/bpm.py into lite-spike