Implement basic standards-compliant logging.

Size field is not working correctly.