There are lots of phrases we use in aviation derived from nautical terms for example 'knots'.
Before technology was used to calculate a ship's speed through the water, a rope was thrown over the side of the ship and the amount of knots tied in the rope which went over the side during a given time was the speed of the ship in knots.
Something obviously had to be tied to the end of the rope which floated and was thrown over the side therefore a log was used. You guessed it, the speed in knots was recorded in a book which became known as 'The Log Book'.