Refactor logger module to separate concerns GitOrigin-RevId: cf9b1e367d881fb9036b2cb0f5c0529763a44695