gofr icon indicating copy to clipboard operation
gofr copied to clipboard

Refactor Remote Config Implementation in Logger

Open aryanmehrotra opened this issue 4 months ago • 4 comments

Reference

Related discussion: gofr-dev/gofr#2114 (comment)

Background

Currently, the logger’s remote log level update is tightly coupled with the Remote Config service. This coupling makes the implementation less flexible and harder to maintain.

Proposal

Refactor the logger’s remote configuration handling so that it:

  1. Decouples log level updates from the Remote Config service.
  2. Leverages a cleaner abstraction (e.g., RemoteConfigurable and RemoteConfiguration interfaces).
  3. Ensures log level remains dynamically updatable at runtime, as it is a valid and useful use case for debugging.

Scope

  • Update the logger to implement the RemoteConfigurable interface.
  • Register the logger with the RemoteConfiguration implementation for runtime updates.
  • Ensure backward compatibility with the current log level remote update functionality.
  • Avoid exposing other runtime config changes until valid use cases emerge.

Acceptance Criteria

  • Logger log level can still be updated at runtime via Remote Config.
  • Logger is decoupled from the Remote Config service implementation.
  • Codebase is simplified and easier to extend in the future.

aryanmehrotra avatar Aug 29 '25 11:08 aryanmehrotra

Hi @aryanmehrotra,

Could you please assign this issue to me? I’d be happy to work on it.

ckshitij avatar Sep 24 '25 16:09 ckshitij

sure @ckshitij

aryanmehrotra avatar Sep 24 '25 20:09 aryanmehrotra

@ckshitij any updates ? Let me know if you are facing any blocker ?

coolwednesday avatar Oct 17 '25 19:10 coolwednesday

@coolwednesday Sorry for the delay — I’ve been caught up with a few other things. I’ve already made the changes locally and am currently working on the unit tests. I’ll raise the PR in the next few days.

ckshitij avatar Oct 30 '25 13:10 ckshitij