Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot Reload for Loggers #2634

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

Conversation

RubenCerna2079
Copy link
Contributor

@RubenCerna2079 RubenCerna2079 commented Mar 24, 2025

Why make this change?

Closes issues #2580 and #2582

What is this change?

Adds hot reload feature for loggers which makes it possible for the user to change the log level filters without restarting the application. This is done by ensuring that the logger factories are updated when there is a hot reload event.
This feature is also available in production mode, it is the only hot reloadable property in production mode.

How was this tested?

  • Integration Tests
  • Unit Tests
  • Manual Testing

Test added:

  • Check if log-level value is properly updated with hot reload, by checking if it is different from previous value and if it is the expected value.

Sample Request(s)

Before hot reload:
image
image

After hot reload:
image
image

@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@RubenCerna2079 RubenCerna2079 force-pushed the dev/rubencerna/HotReload_Logger branch from 5bf2a26 to f628808 Compare March 25, 2025 21:19
@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079 RubenCerna2079 force-pushed the dev/rubencerna/HotReload_Logger branch from 0a4a0c4 to 24cb9ff Compare March 26, 2025 01:02
Copy link
Contributor

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to "compare" configs in Production mode.

Base automatically changed from dev/rubencerna/Add_LogLevel_Filters to main April 1, 2025 19:29
@RubenCerna2079 RubenCerna2079 dismissed aaronburtle’s stale review April 1, 2025 19:29

The base branch was changed.

@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Copy link
Contributor

@aaronburtle aaronburtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one question about setting the log level during a hot-reload in production scenario.

Copy link
Contributor

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge. Thanks for addressing the delicate issue around hot reloading only the log-level in Production mode.

@RubenCerna2079
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants