A log buoy or recorder-marker is a device that is carried aboard starships, and should the starship face a situation in which destruction seems imminent, the buoy is launched and directed towards the nearest allied base. Log buoy's are built to withstand the completed destruction of a starship and many other external forces that could act upon it.
During the USS Enterprise's encounter with the Fesarius in 2266, Captain James T. Kirk had a log buoy launched with all the log entries when destruction seemed imminent. (TOS episode & novelization: The Corbomite Maneuver)
Captain John Bearclaw ordered the USS Gallant's communications officer to launch a log buoy after the ship was ambushed by four Klingon K't'inga-class battle cruisers near the Klingon Neutral Zone in 2285. (TOS comic: "The Wormhole Connection")