A data logger that avoids wasting power when data gathering is not needed
(or is done by other means), but is activated automatically, without the
need for human intervention, when it is needed. The data logger senses
and stores data when a primary power source has failed. The data logger
includes at least one back-up power source, and a detector switch
connected to a primary power source and to one or more back-up power
sources, the detector-switch detecting a condition indicative of the
primary power source failure state, and connecting at least one back-up
power source to provide power to the sampler, the storage medium and the
sensor upon detection of the failure condition.