Minecraft wiki entry for Exploring_caves, associated text: Log - Bringing in a stack of log will let players craft a variety of useful blocks in the field, without having to carry large numbers of all of them: Torches are the most usual, but players can also make a crafting table and then make such blocks as chests, ladders, fences and gates. Don't craft logs into planks or sticks until you need to; large quantities of either will take up more inventory slots than the original logs.
If you find yourself running out of logs, you can stock up by chopping off the log supports of mineshafts, or growing azalea trees.