There is a tool in BSDland called fifolog. It does exactly what you want, but is BSD only to my knowledge. Perhaps you can port it, I can't imagine it would be that hard.
You do need to read the data using the fifolog tools, though. It does not store data in pure text.
-geoff
--------------------------------- Geoff Galitz Blankenheim NRW, Germany http://www.galitz.org/ http://german-way.com/blog/