Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Jun 2, 2025

Summary

Debug log, profiler and ldap debug log had a different logic for
sanitizing of parameters, aligning them.

Checklist

…ross logging methods

Debug log, profiler and ldap debug log had a different logic for
 sanitizing of parameters, aligning them.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added this to the Nextcloud 32 milestone Jun 2, 2025
@come-nc come-nc self-assigned this Jun 2, 2025
@come-nc come-nc added the 3. to review Waiting for reviews label Jun 2, 2025
@come-nc come-nc requested a review from a team as a code owner June 2, 2025 09:49
@come-nc come-nc requested review from ArtificialOwl, icewind1991 and sorbaugh and removed request for a team June 2, 2025 09:49
@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable31

@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable30

@come-nc
Copy link
Contributor Author

come-nc commented Jun 2, 2025

/backport to stable29

@come-nc come-nc requested review from blizzz and susnux June 3, 2025 13:01
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Fine beside one question

'func' => $functionName,
'args' => json_encode($args),
]);
if ($this->config->getSystemValue('loglevel') === ILogger::DEBUG) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed if we then call logger->debug()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sanitizeFunctionParameters felt a bit expensive to run for nothing, so I wanted to only use the computing time if the log is actually gonna happen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually the comment says just that on the line below: /* Only running this if debug loglevel is on, to avoid processing parameters on production */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants