Skip to content

feat: Allow to show logs of all logging types by proxying messages - #1041

Open
susnux wants to merge 4 commits into
masterfrom
feat/allow-listing-all-logs
Open

feat: Allow to show logs of all logging types by proxying messages#1041
susnux wants to merge 4 commits into
masterfrom
feat/allow-listing-all-logs

Conversation

@susnux

@susnuxsusnux commented Nov 11, 2023

Copy link
Copy Markdown
Contributor

This creates an internal log file for all non file loggers, this enables showing all kind of logs.
The internal log file is then rotated by a background job, I think rotation makes more sense to keep the behavior similar to the file logger log file.
Maybe we can add a feature in the future to read also rotated logs (Nextcloud & internal log).

TODO

  • Log rotation / truncating is required otherwise the log would grow infinitely.
  • Adjust unit tests

@codecov

codecovBot commented Nov 11, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (29d0240) 100.00% compared to head (ea032e8) 27.78%.

Additional details and impacted files
@@ Coverage Diff @@## master #1041 +/- ##
==============================================
- Coverage 100.00% 27.78% -72.22% - Complexity 0 188 +188 
==============================================
Files 10 18 +8 Lines 168 565 +397 Branches 31 0 -31 ==============================================
- Hits 168 157 -11 - Misses 0 408 +408 
FlagCoverage Δ
unit27.78% <42.64%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

FilesCoverage Δ
lib/Controller/LogController.php0.00% <ø> (ø)
lib/Log/LogProxy.php100.00% <100.00%> (ø)
lib/Service/SettingsService.php76.00% <ø> (ø)
lib/Listener/LogListener.php43.75% <60.00%> (ø)
lib/BackgroundJobs/Rotate.php0.00% <0.00%> (ø)
lib/Log/LogIteratorFactory.php0.00% <0.00%> (ø)

... and 22 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@susnux
susnuxforce-pushed the feat/allow-listing-all-logs branch 7 times, most recently from 463a66a to b52244fCompareNovember 11, 2023 22:56
@susnux
susnux marked this pull request as ready for review November 11, 2023 22:57
@susnux
susnuxforce-pushed the feat/allow-listing-all-logs branch from b52244f to 5c13cc9CompareNovember 11, 2023 22:58
…non-file based loggers
Also no longer provide the "enabled" setting as now all log types are supported
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Decided to rotate instead of truncate for future use with possible feature that also supports reading the rotated log file.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the feat/allow-listing-all-logs branch from 5c13cc9 to ea032e8CompareNovember 11, 2023 23:21
@blizzzblizzz added this to the Nextcloud 29 milestone Nov 23, 2023
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

@skjnldsvskjnldsv added this to the Nextcloud 33 milestone Sep 28, 2025
@blizzzblizzz modified the milestones: Nextcloud 33, Nextcloud 34Feb 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Logreader warns about log_type to be syslog

8 participants

@susnux@kesselb@come-nc@MrRinkana@blizzz@Altahrim@skjnldsv@nextcloud-bot