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

[Bug]: loglevel setting does not work on 31.0.0-RC1 #50443

Closed
4 of 8 tasks
paulijar opened this issue Jan 26, 2025 · 1 comment · Fixed by #50455 or IONOS-Productivity/nc-server#125
Closed
4 of 8 tasks

[Bug]: loglevel setting does not work on 31.0.0-RC1 #50443

paulijar opened this issue Jan 26, 2025 · 1 comment · Fixed by #50455 or IONOS-Productivity/nc-server#125
Assignees
Labels
1. to develop Accepted and waiting to be taken care of 31-feedback bug feature: logging
Milestone

Comments

@paulijar
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

The logging system does not seem to respect the loglevel configured in config.php or through the admin settings, instead the level is always warning (2). Testing with value 0 in the configuration, I saw some selected few debug messages appear in the log but most of them were missing.

I believe that the bug is in the commit 63f3309. Without understanding the entire Log module or the context of the said fix, I'm pretty sure that there should be statement $this->nestingLevel--; in front of this return statement, too:

return min((int)$configLogLevel, ILogger::FATAL);

Or at least adding this line fixed the issue on my system. This also showcases nicely, why it is usually a bad idea to have multiple return statements in a non-trivial function.

Steps to reproduce

  1. Configure loglevel as 0
  2. Use your Nextcloud for a while
  3. Check logs => there are only few debug level lines
  4. Configure loglevel as 4
  5. Use your Nextcloud for a while
  6. Check logs => there probably are some warning level lines after the point in time when the configuration was changed

Expected behavior

The loglevel configuration should be respected by the logging system.

Nextcloud Server version

31

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

@paulijar paulijar added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 26, 2025
@nickvergessen nickvergessen self-assigned this Jan 27, 2025
@nickvergessen nickvergessen added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jan 27, 2025
@nickvergessen nickvergessen added this to the Nextcloud 31 milestone Jan 27, 2025
@nickvergessen
Copy link
Member

Noticed this too the other day.

Without understanding the entire Log module or the context of the said fix, I'm pretty sure that there should be statement $this->nestingLevel--; in front of this return statement, too:

Totally true and one of the reasons why I disliked the approach, but I had no better idea yet :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of 31-feedback bug feature: logging
Projects
None yet
3 participants