[PATCH 1/2] logging: refactor to store config inside log handler