Make federation logging configurable.
Abstract a bit more.
Merge bug26042