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

Excessive INFO logs from presentation-backend.Rpc category #876

Open
karolis-zukauskas opened this issue Feb 18, 2025 · 3 comments · Fixed by iTwin/itwinjs-core#7727
Open
Assignees

Comments

@karolis-zukauskas
Copy link

INFO level logs from presentation-backend.Rpc are logging too much - it seems like the entire ruleset is logged which in my apps case turns out to be ~20K characters in log line length (which translates to ~20KB file size per log). These log calls should be turned into TRACE level or they should not log so much debug information.

Info level logs should be short and provide additional context of what is happening in the application (what is the user doing), they should not include full blown debug information.

Example logs:

2025-02-18 11:47:20.669 [info] |presentation-backend.Rpc| Received 'getPagedContent' request. Params: ...
2025-02-18 11:47:20.716 [info] |presentation-backend.Rpc| Received 'getPagedNodes' request. Params: ...
2025-02-18 11:47:19.861 [info] |presentation-backend.Rpc| Received 'getContentDescriptor' request. Params: ...
@grigasp
Copy link
Member

grigasp commented Feb 18, 2025

Thanks for the issue, @karolis-zukauskas. A problem for us is that getPagedNodes request is basically used for all the possible hierarchies in the application, so seeing just the request name doesn't really tell "what is the user doing". We need at least some of the parameters to tell that.

Is the ruleset the only offending param? Maybe we could just log ruleset id instead of the whole ruleset..

@grigasp grigasp self-assigned this Feb 18, 2025
@karolis-zukauskas
Copy link
Author

Is the ruleset the only offending param? Maybe we could just log ruleset id instead of the whole ruleset..

Actual ruleset is the majority of log size. I think this logInfo would be fine if only ruleset id was logged.

Example of one of the log entries:
Image

@grigasp
Copy link
Member

grigasp commented Feb 19, 2025

@karolis-zukauskas, the PR merged into master and is scheduled for 5.0 release. Do you need it backported?

@grigasp grigasp reopened this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants