Log, meaning a record of observations or readings, stems from the 16th century when sailors would track their ship's progress by timing how long a log or wooden board tied to 150 fathom length of rope would take to run out. These daily recordings were written down in a logbook, an action which would give us the verb logging. The act of recording men's in the logbook would later also become known as logging - this would later us give us log in and login, in terms of entering a username to access a computer.
Centuries after the physical log had disappeared, logs made their way into computing as a term for records of the speed and performance of a computer or program.
Sources: Oxford English Dictionary