A method for handling logs, wherein the method comprises the following steps: -retrieving or generating a unique code at a first moment; -establishing, by means of a position determining device, position information as to the geographical position of a portable, hand-held log marking tool (1) at said first moment; -applying the code as a corresponding code marking on a log by means of the log marking tool at a second moment and automatically establishing a time value representing the time elapsed between said first moment and said second moment; -comparing said time value with a predetermined time threshold value; and -storing the code as an authenticated code in a database associated to the position information when said time value is smaller than the time threshold value. The invention also relates to a log marking tool(1) for use in such a method.