Modify log.erl to be an OTP gen_server.
Adjust message format according the document.
Follow the document.
Remove unused lines.