Logs take sawdust spawn, not grain spawn. DMR publishes three sawdust spawn formulations built on sawdust with wheat or rice bran, sugar and calcium carbonate.
The process is a laboratory one. Containers are autoclaved at 20 psi for two hours, then inoculated and incubated for 30 days at 24 plus or minus 2 C. Unless you have that equipment and training, buy spawn from a recognised laboratory and check the date on it.

