flow log v3.1

Now with multi flow manager support.

Replaces #1032.