First tests with E-5 soil moisture sensor and ECH2O handheld monitor (not strictly a datalogger since it doesn't store readings). An identical set was recently tested with Kenyan students by VeSeL member Cecilia Oyugi. It can relate to soil information, for example here.
I stuck the sensor in this pot of rosemary. The first reading - on this slightly drizzly day - was 14.5 percent water content in the soil. Soils typically are 50 percent dirt and 50 percent air pockets which can be filled with water. Rosemary is generally happy with a wide range of soil moisture levels (see this dissertation for more), and although my soil is on the dry side as I suspected, Rosemary can be grown successfully in drought conditions, according to this article.
Soil moisture levels are typically measured by running a small voltage through two metal conductors placed close together, and measuring the voltage passing through them - this will vary according to the medium they're placed in, and water will ease the flow of electrons from one post to the other. A simple DIY soil moisture sensor can be made using two galvanized nails - see for example this article or this article.