Skip to content

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).

Copy link
Collaborator

@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.

@github-project-automation github-project-automation bot moved this from Todo to Review In Progress in Data API builder Apr 1, 2025
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
Collaborator

@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).

@RubenCerna2079 RubenCerna2079 merged commit 6f4b622 into main Apr 4, 2025
11 checks passed
@RubenCerna2079 RubenCerna2079 deleted the dev/rubencerna/HotReload_Logger branch April 4, 2025 18:42
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Data API builder Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add Unit Tests for log-level hot reload Add documentation for log-level hot reload Implement Logic for log-level hot reload

3 participants