The accepted method is to log it into a patent notebook (bound book with numbered pages), and get it co-signed by someone knowledgeable enough to testify in court about the content. Signature should say 'read and understood'.
This book makes good reading:
Laser: The Inventor, the Nobel Laureate, and the Thirty-Year Patent War
A much better way to establish priority is to file a provisional patent, good for a year.
The book "Patent it yourself" makes good reading - not as good as working with a patent attorney, but a lot cheaper.