Move LOG4CXX_LIST_DEFs to namespace scope. Keep a typedef for KeySet in LoggingEvent to satisfy qualified references elsewhere.
Include <iterator> to declare std::insert_iterator.