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

Log Cleanup when Log Limit Changed #458

Closed
chaddblanchard opened this issue Dec 19, 2022 · 1 comment · Fixed by #489
Closed

Log Cleanup when Log Limit Changed #458

chaddblanchard opened this issue Dec 19, 2022 · 1 comment · Fixed by #489
Assignees
Labels
Milestone

Comments

@chaddblanchard
Copy link

When the log limit is changed the logs aren't cleared the from WordPress dB.

WordPress Environment

  • Website URL: Internal
  • PHP Version: 7.4
  • WordPress Version: 6.1
  • Plugin Version: 3.9.1
  • Identity Provider: IdentityServer4
  • Relevant Plugin Settings:
@timnolte timnolte added this to To do in 3.9.2 Release May 11, 2023
@timnolte timnolte self-assigned this May 11, 2023
@timnolte timnolte added this to the 3.9.2 milestone May 23, 2023
@timnolte
Copy link
Collaborator

timnolte commented Jun 5, 2023

@chaddblanchard just noting that the way the plugin is setup it doesn't clear logs when the plugin settings are changed but when a log entry is saved. I did however discover that the plugin was incorrectly handling it's logging where it was actually removing all log entries except for the latest log entry after it went over the limit. I have fixed that incorrect behavior however, the logging class isn't available when saving the plugins settings. The logger is available to the settings screen for the purposes of showing the logs so I'm adding code to give the immediate "appearance" that the log limit change has taken affect but it won't truly take place until the next logging entry has been created.

@timnolte timnolte moved this from To do to In progress in 3.9.2 Release Jun 5, 2023
timnolte added a commit that referenced this issue Jun 23, 2023
* Updates additional linting & static analysis dependencies.
* Fixes newly identified linting & static analysis errors.
* Fixes #458.
* Updates the log cleanup handling to properly retain the configured
  number of log entries.
* Updates the log display output to reflect the log retention policy.
@timnolte timnolte linked a pull request Jun 23, 2023 that will close this issue
6 tasks
3.9.2 Release automation moved this from In progress to Done Jun 23, 2023
timnolte added a commit that referenced this issue Jun 23, 2023
* fix(deps): Updates development dependencies
  * Updates the minimum PHP version to 7.4.
  * Updates the development PHP version to 8.0.
  * Updates the development dependencies to the latest versions.

* fix: Updates development dependencies & fixes log cleanup
  * Updates additional linting & static analysis dependencies.
  * Fixes newly identified linting & static analysis errors.
  * Fixes #458.
  * Updates the log cleanup handling to properly retain the configured number of log entries.
  * Updates the log display output to reflect the log retention policy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants