A log on a beach looks like a forest tree that took a trip. Inside the wet wood, the fungi doing the digesting are often not the forest species. Marine fungi, many of them with spores suited to salt water, colonize driftwood and submerged timber. Some fruit as tiny dark specks. You will not get a classic cap and stem.
Jan and Erika Kohlmeyer's Marine Mycology is the classic survey of that group. Carbon that grew in a watershed does not stop being food at the tide line. Fungi follow it into salt water. A shore stripped of every log is a shore with that pantry closed. Where the site can spare the timber, the log is habitat, not only debris.