So I heard good things about boost log. This claims its existence:
http://boost-log.sourceforge.net/libs/log/doc/html/index.html
This is the tutorial:
Unknown symbol in text_file_backend.cpp at line 1197 while building boost-log-1-1 with boost 1.51.0
I am using Windows MSVC 2010, but I suspect that the problem I had may be common to other platforms as well. I copied the boost.log sources into the boost 1.51 source tree and ran bootstrap.bat and .\b2 as per the instructions. The build failed, complaining that get_generic_category() is an unknown symbol in text_file_backend.cpp at line 1197
I changed line 1197 of text_file_backend.cpp so that it now reads
system::error_code(system::errc::io_error, system::generic_category()));
and I re-ran the build. The build worked.
I hope this helps someone else who has trouble building the boost-log library with boost 1.51
Please see http://www.boost.org/doc/libs/1_51_0/libs/system/doc/reference.html#Deprecated-names for more information about this change.
Edit: I just tried again using the boost-log sources direct from Subversion trunk, and it compiled OK. So the solution is: ignore boost-log 1.1 and use the Subversion trunk.