Export debug log by level

Closes #4