Minecraft wiki entry for Log, associated text: Oak, spruce, jungle and dark oak logs generate as masts in shipwrecks.‌[Java Edition only]
Stripped logs also generate as masts in shipwrecks.‌[Bedrock Edition only]