flat->nested-log