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