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

Documenting how to get the current log level #23

Closed
mwittrock opened this issue Nov 17, 2023 · 6 comments
Closed

Documenting how to get the current log level #23

mwittrock opened this issue Nov 17, 2023 · 6 comments
Assignees
Labels
size/m Requires medium effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. ua-review Under review by the UA team.

Comments

@mwittrock
Copy link
Contributor

Issue description

Hi there

My feedback is about this paragraph:

When adding logs in the script, use a switcher that allows to activate or deactivate them. Use the log level of the integration flow or the externalized parameters as switcher.

Specifically the "use the log level of the integration flow" part. I'm assuming this is referring to getting the log level via the SAP_MessageProcessingLogConfiguration property, but this approach is strictly speaking not documented anywhere.

Logging based on the current log level is a very sound idea, so shouldn't it be documented how to do that?

Thank you and regards,

Morten

Feedback Type (Optional)

content gaps

Page Title on SAP Help Portal (prefilled)

General Scripting Guidelines

Page URL on SAP Help Portal (prefilled)

https://help.sap.com/docs/CLOUD_INTEGRATION/368c481cd6954bdfa5d0435479fd4eaf/fcbf0f20059a4ffba7dfda7d28830ccd.html?locale=en-US&version=Cloud&q=general%20scripting%20guidelines

@AnnikaGonnermann
Copy link

HEy @mwittrock: Thank you for your feedback! We’ll look into it and come back to you if we have any questions.

@AnnikaGonnermann AnnikaGonnermann added size/m Requires medium effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. ua-review Under review by the UA team. labels Nov 17, 2023
@AnnikaGonnermann
Copy link

Hey @mwittrock - thank you for your patience. We are still working on your issue! Best, Annika

1 similar comment
@AnnikaGonnermann
Copy link

Hey @mwittrock - thank you for your patience. We are still working on your issue! Best, Annika

@vadimklimov
Copy link
Contributor

It may also be worth mentioning (and reflecting in the documentation which @mwittrock highlighted here) that options to enable/disable additional logging based on using a log level (derived from SAP_MessageProcessingLogConfiguration?) and an externalized configuration parameter, are not entirely equivalent:

  • When using SAP_MessageProcessingLogConfiguration, switching additional logging on and off is dynamic - a change of a log level doesn't require an iFlow redeployment,
  • When using an externalized configuration parameter in an iFlow as a switcher, for the change to take effect, an iFlow has to be redeployed whenever the parameter value gets changed.

In my personal view, generally speaking, options that are the least disruptive, that are dynamic and that can be applied directly at runtime, shall be preferred when changing verbosity compared to those requiring reconfiguration and redeployment of an iFlow. I tend to consider the verbosity (of an iFlow, for example - and correspondingly the amount of logging information that is generated by an iFlow at runtime) to be an aspect related to the runtime, rather than to the configuration time - hence, it shall leverage runtime-native mechanisms, keeping configuration aspects of an iFlow at design time aside.

@pe-gu
Copy link
Contributor

pe-gu commented Dec 14, 2023

Hello,
Thank you for your feedback!
In the meantime, we can point you to a solution, however, with one limitation regarding the property SAP_MessageProcessingLogConfiguration that you mentioned. This property is in the system and can be used, however, this is not a property that is recommended to use. SAP does not give any guarantee for scenarios that use this property. That’s why it is also not documented.
Since a few days however, we have another option for you to access the log level at runtime (for reading access): use a Groovy Script as described in topic Setting Log Levels (at the bottom of the topic). We hope that this helps you to solve your challenges.
As in this thread you also have raised the question how to change the log level at runtime (write access), we would like to point you to the header SAP_MessageProcessingLogLevel that is also documented in Headers and Exchange Properties Provided by the Integration Framework.
I have also updated the topic General Scripting Guidelines and added the corresponding information and hyperlinks.
Many thanks for your great input!

@mwittrock
Copy link
Contributor Author

Great and detailed update, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/m Requires medium effort to get changed. type/examples-samples Related to existing examples/samples, or request for new examples/samples. ua-review Under review by the UA team.
Projects
None yet
Development

No branches or pull requests

4 participants