log.py updates

Add docstring, update comments, fix link, and other minor edits.