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

CIRC-2210: Remove excessive INFO logging of rules in ExecutableRules #1527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianladisch
Copy link
Contributor

https://folio-org.atlassian.net/browse/CIRC-2210

Purpose

ExecutableRules.determinePolicy runs

      log.info("Executing circulation rules: `{}` with parameters: `{}` to determine {}",
        text, parameters, policyType);

which prints the text variable that contains the circulation rules file that may contain hundres of lines.

This is printed whenever circulation rules are applied, this is very often.

This bloats the log.

This is not needed at INFO level.

And the log.info it is not needed at DEBUG level because the calling methods in ExecutableRules already log parameters and policyType, and CirculationRulesCache already logs the the rules when needed:

      log.info ("getRulesFromCache:: cache hit for tenant {}", tenantId);
      log.debug("getRulesFromCache:: cached rules: {}", cachedRules::getRulesAsText);

Approach

Delete log.info in ExecutableRules.determinePolicy.

TODOS and Open Questions

  • Check logging

Learning

Avoid multi-line logging on INFO level.
Avoid duplicate logging.

…leRules

https://folio-org.atlassian.net/browse/CIRC-2210

ExecutableRules.determinePolicy runs

```
      log.info("Executing circulation rules: `{}` with parameters: `{}` to determine {}",
        text, parameters, policyType);
```

which prints the text variable that contains the circulation rules file that may contain hundres of lines.

This is printed whenever circulation rules are applied, this is very often.

This bloats the log.

This is not needed at INFO level.

And the log.info it is not needed at DEBUG level because the calling methods in ExecutableRules already log parameters and policyType, and CirculationRulesCache already logs the the rules when needed:

```
      log.info ("getRulesFromCache:: cache hit for tenant {}", tenantId);
      log.debug("getRulesFromCache:: cached rules: {}", cachedRules::getRulesAsText);
```

Task: Delete log.info in ExecutableRules.determinePolicy.
@julianladisch julianladisch requested a review from a team January 6, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant