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